home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / 4dostool / jp4ref.zip / REFMAN.DOC < prev   
Text File  |  1993-11-30  |  1MB  |  22,605 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                                         4DOS (r)
  12.  
  13.                                         4OS2 (tm)
  14.  
  15.                                   4DOS for Windows NT
  16.  
  17.  
  18.  
  19.  
  20.                                     Reference Manual
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                                       Developed By
  27.                                 Rex Conn and Tom Rawson
  28.  
  29.                                     Documentation By
  30.                        Hardin Brothers, Tom Rawson, and Rex Conn
  31.  
  32.  
  33.  
  34.  
  35.  
  36.                                       Published By
  37.  
  38.                                     JP Software Inc.
  39.                                      P.O. Box 1470
  40.                                 East Arlington, MA 02174
  41.                                          U.S.A.
  42.  
  43.                                      (617) 646-3975
  44.                                    fax (617) 646-0904
  45.  
  46.  
  47.  
  48.  
  49.  
  50.                                   ACKNOWLEDGMENTS
  51.  
  52.  
  53.              We couldn't produce products like 4DOS, 4OS2, and 4DOS/NT
  54.              without the dedication and quality work of many people.  Our
  55.              thanks to:
  56.  
  57.                   JP Software Staff:  Mike Bessy, Helen Coyne, Ellen Stone,
  58.                   Marcella Turner, Misty White.
  59.  
  60.                   Online Support:  Brian Miller and Tess Heder of Channel 1
  61.                   BBS; Don Watkins of CompuServe's IBMNET.
  62.  
  63.                   Beta Test Support:  David Moskowitz, Guy Scharf, and
  64.                   Martin Schiff, of CompuServe's CONSULT forum.
  65.  
  66.                   Beta Testers:  We can't list all of our beta testers
  67.                   here!  A special thanks to all of you who helped make
  68.                   4DOS, 4OS2, and 4DOS/NT elegant, reliable, and friendly.
  69.  
  70.  
  71.              The following tools are used in creating and maintaining 4DOS,
  72.              4OS2, and 4DOS/NT:
  73.  
  74.                   Compilers:       Microsoft C, Microsoft Macro Assembler,
  75.                                    IBM C-Set/2, Borland Turbo Pascal
  76.                   Libraries:       Spontaneous Assembly (Base Two
  77.                                    Development), Turbo Professional (Turbo
  78.                                    Power Software)
  79.                   Editors:         Edix (Emerging Technology), Brief
  80.                                    (Solution Systems)
  81.                   Debuggers:       Periscope (The Periscope Company),
  82.                                    Soft-ICE (Nu-Mega Technologies)
  83.                   Version Control: PVCS (Sage Software)
  84.                   Documentation:   Microsoft Word for Windows with Adobe
  85.                                    Type Manager
  86.  
  87.  
  88.              Program and Documentation Copyright c 1988 - 1993, JP Software
  89.              Inc., All Rights Reserved.  4DOS is a registered trademark and
  90.              4OS2, JP Software, and the JP Software logo and product logos
  91.              are trademarks of JP Software Inc.  Other product and company
  92.              names are trademarks of their respective owners.
  93.  
  94.                                                                      11-93B
  95.  
  96.                                                                    CONTENTS
  97.         -------------------------------------------------------------------
  98.  
  99.  
  100.         CONTENTS
  101.  
  102.         Introduction...............................................1
  103.             How to Use This Manual.................................2
  104.             Registration and Upgrade Information...................6
  105.             Technical Support......................................7
  106.  
  107.         Chapter 1 / General Concepts..............................10
  108.             Operating Systems and Command Processors..............10
  109.                 Primary and Secondary Shells......................12
  110.             Files and Directories.................................13
  111.                 Drives and Volumes................................14
  112.                 File Systems......................................14
  113.                 Directories and Subdirectories....................15
  114.                 File Names........................................16
  115.                 File Attributes...................................18
  116.             Internal and External Commands........................18
  117.             Executable Files and File Searches....................20
  118.             The Environment.......................................21
  119.             ASCII and Key Codes...................................22
  120.             The Keyboard..........................................23
  121.             Video.................................................24
  122.             ANSI Drivers..........................................24
  123.  
  124.         Chapter 2 / Conventions...................................26
  125.             Colors and Color Names................................26
  126.                 Blinking Text and Bright Background Colors........27
  127.             Color-Coded Directories...............................30
  128.             Keys and Key Names....................................31
  129.  
  130.         Chapter 3 / Using 4DOS, 4OS2, and 4DOS/NT.................33
  131.             At the Command Line...................................33
  132.                 Command-Line Editing..............................34
  133.                 Command History and Recall........................35
  134.                 Local and Global Command History..................38
  135.                 Command History Window............................39
  136.                 Filename Completion...............................40
  137.                 Filename Completion Window........................41
  138.                 Directory Changes and CDPATH......................42
  139.                 Directory History Window..........................43
  140.                 Automatic Directory Changes.......................44
  141.                 Multiple Commands.................................45
  142.                 Temporarily Disabling Aliases.....................46
  143.                 Command Line Help.................................46
  144.                 Command-Line Length Limits........................47
  145.             Page and File Prompts.................................48
  146.             Critical Errors.......................................49
  147.             Input and Output......................................50
  148.  
  149.         -------------------------------------------------------------------
  150.         Copr. 1993, JP Software Inc.      4DOS, 4OS2, 4DOS/NT Reference / i
  151.  
  152.                                                                    CONTENTS
  153.         -------------------------------------------------------------------
  154.  
  155.                 Redirection.......................................50
  156.                 Piping............................................53
  157.                 Keystack..........................................55
  158.             File Selection........................................56
  159.                 Extended Parent Directory Names...................57
  160.                 Wildcards.........................................57
  161.                 Date, Time, and Size Ranges.......................60
  162.                 Multiple Filenames................................64
  163.                 Include Lists.....................................65
  164.                 Executable Extensions.............................66
  165.             Advanced Features.....................................68
  166.                 Conditional Commands..............................68
  167.                 Command Grouping..................................69
  168.                 Escape Character..................................71
  169.             4DOS, 4OS2, and 4DOS/NT Compatibility.................72
  170.  
  171.         Chapter 4 / Aliases and Batch Files.......................74
  172.             Aliases...............................................74
  173.             Batch Files...........................................77
  174.                 .BAT, .CMD, and .BTM Files........................77
  175.                 Echoing...........................................78
  176.                 Batch File Parameters.............................78
  177.                 Batch File Commands...............................80
  178.                 Interrupting a Batch File.........................82
  179.                 Automatic Batch Files.............................82
  180.                 Detecting 4DOS, 4OS2, or 4DOS/NT..................83
  181.                 Using Aliases in Batch Files......................84
  182.                 Debugging Batch Files.............................86
  183.                 Batch File String Processing......................88
  184.                 Batch File Compression............................90
  185.                 REXX Support......................................92
  186.                 EXTPROC Support...................................93
  187.             Using the Environment.................................94
  188.                 Configuration Variables...........................96
  189.                 Internal Variables................................97
  190.                 Variable Functions...............................105
  191.             Command Parsing......................................116
  192.                 Argument Quoting.................................118
  193.  
  194.         Chapter 5 / Configuration................................120
  195.             Using the .INI File..................................120
  196.             .INI File Directives.................................121
  197.                 Types of Directives..............................124
  198.                 Initialization Directives........................125
  199.                 Configuration Directives.........................130
  200.                 Color Directives.................................135
  201.                 Key Mapping Directives...........................136
  202.                 Advanced Directives..............................141
  203.                 Examples.........................................144
  204.  
  205.         -------------------------------------------------------------------
  206.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / ii
  207.  
  208.                                                                    CONTENTS
  209.         -------------------------------------------------------------------
  210.  
  211.         Chapter 6 / Command Reference Guide......................146
  212.             Command Categories...................................147
  213.             How to Use the Command Descriptions..................148
  214.             ?....................................................153
  215.             ACTIVATE.............................................154
  216.             ALIAS................................................155
  217.             ATTRIB...............................................167
  218.             BEEP.................................................169
  219.             BREAK................................................171
  220.             CALL.................................................173
  221.             CANCEL...............................................174
  222.             CD / CHDIR...........................................175
  223.             CDD..................................................177
  224.             CHCP.................................................178
  225.             CLS..................................................179
  226.             COLOR................................................180
  227.             COPY.................................................181
  228.             CTTY.................................................187
  229.             DATE.................................................188
  230.             DEL / ERASE..........................................189
  231.             DELAY................................................192
  232.             DESCRIBE.............................................193
  233.             DETACH...............................................195
  234.             DIR..................................................196
  235.             DIRS.................................................205
  236.             DO...................................................206
  237.             DPATH................................................209
  238.             DRAWBOX..............................................210
  239.             DRAWHLINE............................................212
  240.             DRAWVLINE............................................213
  241.             ECHO.................................................214
  242.             ECHOS................................................216
  243.             ENDLOCAL.............................................217
  244.             ESET.................................................218
  245.             EXCEPT...............................................220
  246.             EXIT.................................................222
  247.             FOR..................................................223
  248.             FREE.................................................228
  249.             GLOBAL...............................................229
  250.             GOSUB................................................231
  251.             GOTO.................................................232
  252.             HELP.................................................234
  253.             HISTORY..............................................235
  254.             IF...................................................238
  255.             IFF..................................................244
  256.             INKEY................................................247
  257.             INPUT................................................249
  258.             KEYBD................................................251
  259.             KEYS.................................................253
  260.  
  261.         -------------------------------------------------------------------
  262.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / iii
  263.  
  264.                                                                    CONTENTS
  265.         -------------------------------------------------------------------
  266.  
  267.             KEYSTACK.............................................254
  268.             LH / LOADHIGH........................................257
  269.             LIST.................................................260
  270.             LOADBTM..............................................263
  271.             LOG..................................................264
  272.             MD / MKDIR...........................................266
  273.             MEMORY...............................................267
  274.             MOVE.................................................269
  275.             MSGBOX...............................................273
  276.             ON...................................................274
  277.             PATH.................................................276
  278.             PAUSE................................................279
  279.             POPD.................................................280
  280.             PROMPT...............................................281
  281.             PUSHD................................................285
  282.             QUIT.................................................287
  283.             RD / RMDIR...........................................288
  284.             REBOOT...............................................289
  285.             REM..................................................291
  286.             REN / RENAME.........................................292
  287.             RETURN...............................................295
  288.             SCREEN...............................................296
  289.             SCRPUT...............................................298
  290.             SELECT...............................................299
  291.             SET..................................................305
  292.             SETDOS...............................................308
  293.             SETLOCAL.............................................315
  294.             SHIFT................................................316
  295.             START................................................317
  296.             SWAPPING.............................................325
  297.             TEE..................................................326
  298.             TEXT.................................................328
  299.             TIME.................................................329
  300.             TIMER................................................330
  301.             TITLE................................................332
  302.             TRUENAME.............................................333
  303.             TYPE.................................................334
  304.             UNALIAS..............................................335
  305.             UNSET................................................336
  306.             VER..................................................338
  307.             VERIFY...............................................339
  308.             VOL..................................................340
  309.             VSCRPUT..............................................341
  310.             WINDOW...............................................343
  311.             Y....................................................344
  312.  
  313.         Appendix A / Error Messages..............................345
  314.  
  315.  
  316.         -------------------------------------------------------------------
  317.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / iv
  318.  
  319.                                                                    CONTENTS
  320.         -------------------------------------------------------------------
  321.  
  322.         Appendix B / ASCII and Key Codes.........................357
  323.             Keys and Key Codes...................................361
  324.  
  325.         Glossary.................................................368
  326.  
  327.         Index....................................................380
  328.  
  329.         Quick Reference..........................................394
  330.             Internal Variables...................................394
  331.             Variable Functions...................................395
  332.             .INI File Directives.................................396
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.         -------------------------------------------------------------------
  374.         Copr. 1993, JP Software Inc.      4DOS, 4OS2, 4DOS/NT Reference / v
  375.  
  376.                                                      CONTACTING JP SOFTWARE
  377.         -------------------------------------------------------------------
  378.  
  379.  
  380.  
  381.         CONTACTING JP SOFTWARE
  382.  
  383.         You can contact JP Software at any of the following addresses.  Our
  384.         normal business hours are 9:00 AM to 5:00 PM weekdays, eastern US
  385.         time.  For more information about contacting us for technical
  386.         support, see page 7.
  387.  
  388.  
  389.              By mail:
  390.  
  391.                   JP Software Inc.
  392.                   P.O. Box 1470
  393.                   East Arlington, MA 02174
  394.                   USA
  395.  
  396.  
  397.              By telephone / fax:
  398.  
  399.                   Voice:         (617) 646-3975
  400.                   Fax:           (617) 646-0904
  401.                   Order Line:    (800) 368-8777 (orders only, USA only)
  402.  
  403.  
  404.              Electronically:
  405.  
  406.                   CompuServe:    Customer Service 75020,244
  407.                                  Technical Support, GO JPSOFT or GO PCVENB
  408.                                  (section 10), User ID 75300,1215
  409.                   Internet:      Customer Service 75020.244@compuserve.com
  410.                                  Technical Support
  411.                                       75300.1215@compuserve.com
  412.                   BBS Support:   Via Channel 1 BBS, Boston, 617-354-5776 at
  413.                                  2,400 - 14,400 baud, no parity, 8 data
  414.                                  bits, 1 stop bit
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.         -------------------------------------------------------------------
  430.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / vi
  431.  
  432.                                                                INTRODUCTION
  433.         -------------------------------------------------------------------
  434.  
  435.  
  436.         INTRODUCTION
  437.  
  438.  
  439.              Welcome to our Reference Manual.  We have designed this manual
  440.              to accompany three of our products:  4DOS, 4OS2, and 4DOS for
  441.              Windows NT.
  442.  
  443.              Technically, each of these programs is a command interpreter
  444.              or "shell."  That means that they respond to the commands you
  445.              type at the C:\> or [C:\] prompt.  Each is designed to replace
  446.              the default command interpreter that was supplied with your
  447.              operating system:
  448.  
  449.                   4DOS      replaces  COMMAND.COM from DOS
  450.                   4OS2      replaces  CMD.EXE from OS/2
  451.                   4DOS/NT   replaces  CMD.EXE from Windows NT
  452.  
  453.              4DOS can also be used as the command interpreter for DOS
  454.              sessions running under OS/2, and under Windows 3.0 and above.
  455.  
  456.              Each of our products is highly compatible with the command
  457.              interpreter that it replaces.  That means that you don't have
  458.              to change your computing habits or unlearn anything to use any
  459.              of these products.  Each also adds many new features and
  460.              commands to its operating environment.  They make the
  461.              operating system friendlier, easier to use, and much more
  462.              powerful and versatile, without requiring you to learn a new
  463.              program, a new set of commands, or a new style of work.
  464.  
  465.              Each product is shipped with this manual plus a smaller
  466.              Introduction and Installation Guide.  Please start with the
  467.              smaller manual.  It will tell you how to get started with the
  468.              product you purchased and also contains some other information
  469.              that applies specifically to that product.
  470.  
  471.              Once you have installed 4DOS, 4OS2, or 4DOS for Windows NT,
  472.              you can learn its features at your own pace.  Relax, enjoy the
  473.              power of your new program, and browse through both manuals
  474.              occasionally.  Press the F1 key whenever you need help.  The
  475.              program will soon become an essential part of your computer,
  476.              and you'll wonder how you ever got along without it.
  477.  
  478.              If you are a new user and want to take your new program for a
  479.              spin without performing a complete installation, see the
  480.              Guided Tour pamphlet included with your copy of 4DOS, 4OS2, or
  481.              4DOS/NT.
  482.  
  483.  
  484.  
  485.         -------------------------------------------------------------------
  486.         Copr. 1993, JP Software Inc.      4DOS, 4OS2, 4DOS/NT Reference / 1
  487.  
  488.                                                                INTRODUCTION
  489.         -------------------------------------------------------------------
  490.  
  491.              We are constantly working to improve these programs.  If you
  492.              have suggestions for features or commands that you think we
  493.              should include in the next version, or any other way we could
  494.              improve our product, please let us know.  Many of the
  495.              improvements in this version were suggested by our users, and
  496.              while we can't promise to include every suggested feature, we
  497.              really do appreciate and pay attention to your comments.
  498.  
  499.  
  500.         How to Use This Manual
  501.  
  502.              This manual covers three separate products:  4DOS, 4OS2, and
  503.              4DOS for Windows NT.  We have combined reference information
  504.              for the products in one manual because 4DOS, 4OS2, and 4DOS
  505.              for Windows NT offer almost exactly the same features and
  506.              commands, so individual manuals would be almost identical.
  507.              Many of our customers use more than one of these products;
  508.              they find that a single manual helps them understand the
  509.              similarities and differences of the three products.  In
  510.              addition, printing a single manual reduces our costs and lets
  511.              us bring you the most powerful command interpreters available
  512.              for the lowest possible price.
  513.  
  514.              Most of this manual describes commands and features which are
  515.              available in all three products.  When we need to discuss the
  516.              features or behavior of a single product, we mention it
  517.              specifically in the text.  When an entire paragraph or section
  518.              applies to a specific product, we use marginal text to
  519.              identify that product:
  520.  
  521.      4DOS    marks sections that apply only to 4DOS.
  522.  
  523.      4OS2    marks sections that apply only to 4OS2.
  524.  
  525.      4NT     marks sections that apply only to 4DOS for Windows NT.  For
  526.              brevity, we often refer to this product as "4DOS/NT", or by
  527.              the actual program name, "4NT", in this manual.
  528.  
  529.              Occasionally, a feature will be marked with two of these
  530.              marginal notations when it applies to two different products.
  531.  
  532.              We have designed this manual to serve as a gentle introduction
  533.              to our products for novice users and as a reference manual for
  534.              advanced users.
  535.  
  536.              You will likely find some parts of the manual too simple or
  537.              too technical for your tastes.  Unless you are convinced that
  538.              one of those sections holds just the information you need for
  539.              a specific task, feel free to skip to the next part of the
  540.  
  541.         -------------------------------------------------------------------
  542.         Copr. 1993, JP Software Inc.      4DOS, 4OS2, 4DOS/NT Reference / 2
  543.  
  544.                                                                INTRODUCTION
  545.         -------------------------------------------------------------------
  546.  
  547.              manual that is more to your liking.  You can use almost every
  548.              feature of our products without having to worry about other
  549.              features or commands.
  550.  
  551.              As you read the manual, you will occasionally see an
  552.              exclamation point [!] next to a paragraph.  The exclamation
  553.              point means that that paragraph contains a caution or warning
  554.              you should observe when using the feature it discusses.
  555.  
  556.              You will also see the symbol ## next to certain paragraphs.
  557.              This indicates an in-depth discussion or a more advanced topic
  558.              which you can skip if you wish to stick with the basics.  Come
  559.              back to this topic later for more details, or if you're having
  560.              trouble with the particular issue it discusses.  If you see
  561.              the ## next to a section heading, it means the entire section
  562.              contains such information.
  563.  
  564.              You may find the information in such marked sections useful
  565.              even if you're relatively new to computers or to our products.
  566.              However, you can also skip the marked section and still
  567.              understand and use the basic topic of the larger section
  568.              you're reading.
  569.  
  570.              This manual is divided into six chapters and two appendices,
  571.              plus a glossary and index.  Here's a brief overview of what
  572.              you'll find in each:
  573.  
  574.  
  575.              Chapter 1 / General Concepts
  576.  
  577.                   This chapter is an introduction to several terms and
  578.                   concepts that we use throughout the manual.  If you're a
  579.                   novice, you might want to browse through the entire
  580.                   chapter.  If you're a power user and all of the topics in
  581.                   this chapter seem simple, then go on to the next chapter.
  582.                   If you think you need to brush up a bit on the basics of
  583.                   a couple of terms and ideas, you'll probably find them
  584.                   here.
  585.  
  586.  
  587.              Chapter 2 / Conventions and Restrictions
  588.  
  589.                   This chapter contains information about three conventions
  590.                   that are used throughout 4DOS, 4OS2, and 4DOS/NT:  colors
  591.                   and color names, color-coded directories, and keys and
  592.                   key names.  You'll find many references in the manual to
  593.                   the information in this chapter.  You may choose to read
  594.                   through this chapter to see what is available, or refer
  595.  
  596.  
  597.         -------------------------------------------------------------------
  598.         Copr. 1993, JP Software Inc.      4DOS, 4OS2, 4DOS/NT Reference / 3
  599.  
  600.                                                                INTRODUCTION
  601.         -------------------------------------------------------------------
  602.  
  603.                   to the topics here when you come to a cross reference
  604.                   later in the manual.
  605.  
  606.  
  607.              Chapter 3 / Using 4DOS, 4OS2, and 4DOS/NT
  608.  
  609.                   This chapter is for everyone.  It contains a description
  610.                   of 4DOS, 4OS2, and 4DOS/NT features, and lots of examples
  611.                   to help you learn to use each one.  Even if you are a
  612.                   novice user and want to ignore some of these features
  613.                   until later, skim through this chapter to get an idea of
  614.                   what is available and where to find the information that
  615.                   you will eventually want.  Our products offer both
  616.                   features which are not related to specific commands, and
  617.                   a complete set of over 80 internal commands.  This
  618.                   chapter has complete reference information on most of the
  619.                   non-command features.  Reference information on commands
  620.                   is in Chapter 6.
  621.  
  622.  
  623.              Chapter 4 / Aliases and Batch Files
  624.  
  625.                   This chapter introduces two of the most powerful features
  626.                   in 4DOS, 4OS2, and 4DOS/NT:  Aliases and Batch Files.
  627.                   You can use both to automate much of your computing work.
  628.                   Even if you are a novice user, you should skim through
  629.                   this chapter to see what is available.  This chapter also
  630.                   contains information about using environment variables,
  631.                   and the internal variables and variable functions that
  632.                   make aliases and batch files extremely powerful and
  633.                   flexible.
  634.  
  635.  
  636.              Chapter 5 / Configuration
  637.  
  638.                   This chapter is for advanced users who want to be sure
  639.                   that 4DOS, 4OS2, or 4DOS/NT is running at top efficiency
  640.                   on their systems.  It includes detailed information on
  641.                   setting up your command processor and on changing its
  642.                   configuration.
  643.  
  644.  
  645.              Chapter 6 / Command Reference
  646.  
  647.                   Each of our products offers over 80 internal commands.
  648.                   This chapter explains the purpose of each command and
  649.                   tells you how to use it.  It has examples that will help
  650.                   you learn each command and the technical details you will
  651.                   need to get the command to behave exactly as you wish.
  652.  
  653.         -------------------------------------------------------------------
  654.         Copr. 1993, JP Software Inc.      4DOS, 4OS2, 4DOS/NT Reference / 4
  655.  
  656.                                                                INTRODUCTION
  657.         -------------------------------------------------------------------
  658.  
  659.              Appendices
  660.  
  661.                   We've included some helpful tables here, as well as
  662.                   information for those who like to know technical details.
  663.                   There are two appendices.
  664.  
  665.                   Appendix A lists all error messages.  Look here if you
  666.                   need an explanation of an error message, or if you aren't
  667.                   sure if the message came from 4DOS, 4OS2, or 4DOS/NT.
  668.  
  669.                   Appendix B lists codes for the ASCII character set (your
  670.                   computer's internal method for representing letters,
  671.                   digits, and other characters) and for the keys on your
  672.                   keyboard.  These codes can be useful with certain
  673.                   commands.
  674.  
  675.  
  676.              Glossary
  677.  
  678.                   If you need help with any of the terminology in this
  679.                   manual, look here.
  680.  
  681.  
  682.              Index
  683.  
  684.                   If you can't find the information you need, this should
  685.                   help you find it.
  686.  
  687.  
  688.              Quick Reference
  689.  
  690.                   This quick index will give you the page number for
  691.                   detailed information on each internal variable, variable
  692.                   funtion, and .INI file directive.
  693.  
  694.  
  695.              Additional Files
  696.  
  697.                   Files distributed with 4DOS, 4OS2, and 4DOS/NT cover
  698.                   important additional information beyond what's included
  699.                   in this manual.  README.DOC contains general notes,
  700.                   highlights of the latest release, and brief installation
  701.                   instructions for those upgrading from a downloaded copy
  702.                   of 4DOS, 4OS2, or 4DOS/NT.  MANMOD.DOC covers changes or
  703.                   corrections in the manual, if any, and UPDATxxx.DOC
  704.                   contains detailed information for users with older
  705.                   versions on what has changed in the latest release ("xxx"
  706.                   is the version number).  For 4DOS users we also include
  707.                   APPNOTES.DOC, which contains application notes for a
  708.  
  709.         -------------------------------------------------------------------
  710.         Copr. 1993, JP Software Inc.      4DOS, 4OS2, 4DOS/NT Reference / 5
  711.  
  712.                                                                INTRODUCTION
  713.         -------------------------------------------------------------------
  714.  
  715.                   variety of other software packages to help you use those
  716.                   packages with 4DOS.
  717.  
  718.  
  719.         Registration and Upgrade Information
  720.  
  721.              If you purchased 4DOS, 4OS2, or 4DOS/NT from a software
  722.              dealer, your copy came with a registration card.  Please fill
  723.              out this card and return it promptly to JP Software.  It
  724.              ensures that we have a record of your registration so that we
  725.              can give you ongoing technical support and notices of
  726.              upgrades.  If you purchased 4DOS, 4OS2, or 4DOS/NT directly
  727.              from JP Software, you are already registered and no
  728.              registration card is necessary.
  729.  
  730.              Once you are a registered user, you will receive:
  731.  
  732.                   * A subscription to The Prompt Solution, JP Software's
  733.                     customer newsletter.  The Prompt Solution includes
  734.                     tips for using 4DOS, 4OS2, and 4DOS/NT; notification
  735.                     of upgrades; and information about other products from
  736.                     JP Software.
  737.  
  738.                   * Technical support via electronic mail, fax, mail, or
  739.                     telephone.
  740.  
  741.                   * A downloadable upgrade to the next version of 4DOS;
  742.                     see below for details.
  743.  
  744.              4DOS, 4OS2, and 4DOS/NT are upgraded regularly through
  745.              maintenance releases, designed to fix minor problems or
  746.              improve compatibility, and major upgrades which contain
  747.              enhancements and additional features.  Maintenance releases
  748.              are identified by a change in the hundredths digit of the
  749.              version number, for example from 5.0 to 5.01 or 5.02.  Major
  750.              upgrades are identified by a change in the tenths digit or
  751.              "ones" digit, for example from 5.0 to 5.1 or 6.0.
  752.  
  753.              Major upgrades can be purchased from JP Software or your
  754.              dealer for a modest charge.  For most users the first major
  755.              upgrade released after your initial purchase is available at
  756.              no charge if you download it from one of our support areas
  757.              (see below).  You can also download maintenance releases from
  758.              one of the support areas, or order them on disk at a nominal
  759.              cost.
  760.  
  761.              As a registered user, you will automatically be notified when
  762.              a major upgrade is released.  We don't send out notices when
  763.              maintenance releases become available, because you don't
  764.  
  765.         -------------------------------------------------------------------
  766.         Copr. 1993, JP Software Inc.      4DOS, 4OS2, 4DOS/NT Reference / 6
  767.  
  768.                                                                INTRODUCTION
  769.         -------------------------------------------------------------------
  770.  
  771.              usually need them unless you're having a problem.  If you call
  772.              with a problem that's been addressed in a maintenance release,
  773.              we'll mail you a copy on disk or assist you in downloading it.
  774.  
  775.              As a registered user, you can download maintenance releases
  776.              and your first major upgrade from the JP Software support area
  777.              on CompuServe (GO PCVENB, library 10), or Channel 1 (see
  778.              below).  If you are familiar with the Internet, you can also
  779.              obtain JP Software files via anonymous ftp from the 4DOS
  780.              directory on simtel20 or any of its mirrors.
  781.  
  782.              The file names used for updates vary from time to time
  783.              depending on the extent of the changes made, but typically
  784.              will look like 4DOS5*.ZIP, 4OS22*.ZIP, etc.  The "*" refers to
  785.              one or more characters further identifying the file.  .ZIP
  786.              files are "archives" which contain many other files within
  787.              them.  The files stored inside the .ZIP file are compressed
  788.              for more efficient downloads.  To decompress the .ZIP file and
  789.              gain access to the actual 4DOS, 4OS2, or 4DOS/NT files you
  790.              will need the PKUNZIP program or an equivalent.  Such programs
  791.              are available from the same source as the .ZIP files
  792.              themselves.  Check the directory listings and file
  793.              descriptions on the service you are using to identify the
  794.              files you need.
  795.  
  796.              Downloads are also available from many other local bulletin
  797.              boards and online services.  Lists of download locations,
  798.              including bulletin boards outside the USA, are published from
  799.              time to time in The Prompt Solution and are included in the
  800.              SUPPORT.BBS file that comes with each product.
  801.  
  802.              We offer BBS support through Channel 1 in Boston, one of the
  803.              largest and best-run bulletin boards in the US.  Channel 1 is
  804.              an independent bulletin board and is not owned or operated by
  805.              JP Software.  To access Channel 1 set your modem to any speed
  806.              from 2,400 to 14,400 baud, no parity, 8 data bits, and 1 stop
  807.              bit, and dial 617-354-5776.  Join conference 5 for 4DOS
  808.              downloads.  You can leave support messages and download files
  809.              at no charge, but if you want to use any of Channel 1's other
  810.              excellent services you may need to purchase a membership to
  811.              have sufficient online time.
  812.  
  813.  
  814.         Technical Support
  815.  
  816.              Technical support is available via public electronic support
  817.              conferences, private electronic mail, telephone, fax, and
  818.              mail.  When you contact us for support please give us your
  819.  
  820.  
  821.         -------------------------------------------------------------------
  822.         Copr. 1993, JP Software Inc.      4DOS, 4OS2, 4DOS/NT Reference / 7
  823.  
  824.                                                                INTRODUCTION
  825.         -------------------------------------------------------------------
  826.  
  827.              serial number so that we can verify your status as a customer,
  828.              keep track of your inquiry, and contact you if necessary.
  829.  
  830.              Often the best way to contact us for support is in one of the
  831.              following public electronic support conferences.  The numbers
  832.              in parentheses indicate the usual delay, in business days, to
  833.              receive a reply to a message.
  834.  
  835.              CompuServe / ZiffNet:  Primary support is via the JP Software
  836.              section of the CompuServe PCVENB forum (GO JPSOFT or GO
  837.              PCVENB, section 10, "JP Software") (1 day).
  838.  
  839.              Bulletin Boards:  Primary support is via the Channel 1 BBS,
  840.              Boston, MA (1 - 3 days; see above for access details).
  841.              Messages may be left in any of the 4DOS conferences; check the
  842.              online list for exact conference numbers.  Support is also
  843.              available from many local BBSes via the 4DOS conferences on
  844.              the RIME, ILink, SmartNet, and FidoNet BBS Networks (3-5
  845.              days).
  846.  
  847.              To contact JP Software for support by mail, telephone, fax, or
  848.              electronic mail, see our addresses and phone numbers on page
  849.              vi of this manual.
  850.  
  851.              If you call for support and no technical support
  852.              representative is available, we will do our best to return
  853.              your call within 24 hours (weekends and holidays excluded).
  854.              If your problem is urgent and requires a faster response,
  855.              please let us know and we will try to accommodate you.  If you
  856.              contact us by telephone and don't receive a reply within 24
  857.              hours, please try again.  We may have tried to return your
  858.              call and been unable to reach you.
  859.  
  860.              Before contacting us for support, please check the manuals and
  861.              other documentation for answers to your question.  If you
  862.              can't find what you need, try the Index.  If you're having
  863.              trouble getting 4DOS, 4OS2, or 4DOS/NT to run properly, either
  864.              alone or with your particular hardware or software, see the
  865.              Introduction and Installation Guide, and (for 4DOS) the
  866.              APPNOTES.DOC file on your disk.  Also look through the
  867.              README.DOC and UPDATxxx.DOC files, as they may contain updates
  868.              to this manual or other important information ("xxx" is the
  869.              version number).
  870.  
  871.              If you do need to contact us for support, it helps if you can
  872.              give us some basic information:
  873.  
  874.                   * What exactly did you do?  A concise description of
  875.                     what steps you must take to make the problem appear is
  876.  
  877.         -------------------------------------------------------------------
  878.         Copr. 1993, JP Software Inc.      4DOS, 4OS2, 4DOS/NT Reference / 8
  879.  
  880.                                                                INTRODUCTION
  881.         -------------------------------------------------------------------
  882.  
  883.                     much more useful than a long analysis of what might be
  884.                     happening.
  885.  
  886.                   * What went wrong?  At what point did the failure occur?
  887.                     If you saw an error message or other important or
  888.                     unusual information on the screen, what exactly did it
  889.                     say?
  890.  
  891.                   * Briefly, what techniques did you use to try to resolve
  892.                     the problem?  What results did you get?
  893.  
  894.                   * What computer and operating system are you using?
  895.  
  896.                   * Are you running a network, or using a particular
  897.                     operating environment (such as DESQview or Windows)?
  898.  
  899.                   * What are the contents of any startup files you use
  900.                     (such as CONFIG.SYS, AUTOEXEC.BAT, 4START, 4EXIT, and
  901.                     the .INI file), any batch files they call, and any
  902.                     alias or environment variable files they load?
  903.  
  904.                   * Can you repeat the problem or does it occur randomly?
  905.                     If it's random, does it seem related to the programs
  906.                     you're using when the problem occurs?
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.         -------------------------------------------------------------------
  934.         Copr. 1993, JP Software Inc.      4DOS, 4OS2, 4DOS/NT Reference / 9
  935.  
  936.                                                CHAPTER 1 / GENERAL CONCEPTS
  937.         -------------------------------------------------------------------
  938.  
  939.  
  940.         CHAPTER 1 / GENERAL CONCEPTS
  941.  
  942.  
  943.         You can start using 4DOS, 4OS2, or 4DOS/NT as soon as you finish
  944.         installing it, because each of our products is compatible with the
  945.         traditional commands you're used to.  But most users find that the
  946.         more they know about their computer systems, the more power they
  947.         get from our products.  And, the more experience they gain, the
  948.         more they want to know about their computer system as a whole.
  949.  
  950.         This section of the manual explains some fundamental concepts about
  951.         your computer, operating system, and 4DOS, 4OS2, and 4DOS/NT.  It
  952.         should help you understand the terms and concepts in the pages that
  953.         follow.  If you find some of the concepts overwhelming, just
  954.         remember that they are here when you need them.  If you find this
  955.         material too simple, skim over the topics and then go on to the
  956.         next section.  Each topic in this chapter is independent, so if you
  957.         read it straight through you won't necessarily find a natural
  958.         "flow" from one topic to another.
  959.  
  960.         If you come across terms or concepts in this chapter that you are
  961.         unsure about, refer to the Glossary on page 368 or the Index.
  962.  
  963.  
  964.         Operating Systems and Command Processors
  965.  
  966.              This section explains briefly what an operating system is,
  967.              what a command processor is, and how the command processor
  968.              works under DOS, OS/2, and Windows NT.
  969.  
  970.              An operating system is nothing more than a collection of
  971.              software.  However, unlike application software, which
  972.              performs a specific, user-oriented task (such as creating and
  973.              printing documents, or performing calculations on rows and
  974.              columns of numbers), operating system software is designed to
  975.              perform some special functions.  The operating system
  976.              typically:
  977.  
  978.                   * Starts the computer system.  The operating system is
  979.                     the first software loaded when you turn on the
  980.                     computer.
  981.  
  982.                   * Provides services to other software.  These include
  983.                     basic file access, assignment of your computer's
  984.                     memory for use by different programs, and the control
  985.                     of hardware devices like the keyboard, display,
  986.                     printer, and serial ports.
  987.  
  988.  
  989.         -------------------------------------------------------------------
  990.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 10
  991.  
  992.                                                CHAPTER 1 / GENERAL CONCEPTS
  993.         -------------------------------------------------------------------
  994.  
  995.                   * Ensures that programs don't interfere with each other
  996.                     while they are running.
  997.  
  998.                   * Provides a way for you to start programs to do your
  999.                     work.
  1000.  
  1001.                   * Includes utilities to control and manage your system,
  1002.                     for example to organize disks and files, display
  1003.                     status information, or adjust your system for
  1004.                     international conventions.
  1005.  
  1006.              More complex operating systems may include many more
  1007.              functions, such as built-in network connections, the ability
  1008.              to switch rapidly between many tasks, support for high-quality
  1009.              sound output, and so on.
  1010.  
  1011.              Our products run under the DOS, OS/2, and Windows NT operating
  1012.              systems.
  1013.  
  1014.              Each of these operating systems includes a command processor:
  1015.              a program that accepts your instructions and carries them out.
  1016.              The basic operation of a command processor is very simple:  It
  1017.              prompts you for a command, you type in the command, the
  1018.              command processor executes it, and the cycle repeats.  This
  1019.              sometimes called a "command line" interface, because commands
  1020.              are typically executed line by line.
  1021.  
  1022.              Under DOS, the command-line interface is the only way to tell
  1023.              the operating system what you want it to do.  OS/2 and Windows
  1024.              NT each include a graphical user interface that is intended to
  1025.              replace the command line as the primary method for providing
  1026.              instructions to the operating system.  However, most OS/2 and
  1027.              Windows NT users find that the command line is required for
  1028.              some tasks, and much more efficient for many others.  They
  1029.              therefore use both the graphical interface and the command
  1030.              line, depending on the task at hand.
  1031.  
  1032.              The command processor shipped with DOS is called COMMAND.COM.
  1033.              The command processors shipped with OS/2 and Windows NT are
  1034.              both called CMD.EXE.
  1035.  
  1036.              When you install 4DOS, 4DOS.COM replaces COMMAND.COM as your
  1037.              command processor.  4OS2 replaces the OS/2 version of CMD.EXE
  1038.              with 4OS2.EXE, and 4DOS/NT replaces the Windows NT version of
  1039.              CMD.EXE with 4NT.EXE.  All of these command processors are
  1040.              normal programs that know how to translate your commands into
  1041.              actions.  4DOS, 4OS2, and 4DOS/NT are simply much more
  1042.              powerful command processors than those supplied with each
  1043.              operating system.
  1044.  
  1045.         -------------------------------------------------------------------
  1046.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 11
  1047.  
  1048.                                                CHAPTER 1 / GENERAL CONCEPTS
  1049.         -------------------------------------------------------------------
  1050.  
  1051.      4DOS    Under DOS, the command processor is started automatically at
  1052.              the end of the boot process.  If you don't want to use
  1053.              COMMAND.COM as your command processor, you use the SHELL
  1054.              statement in CONFIG.SYS to specify a different command
  1055.              processor.
  1056.  
  1057.      4OS2    Under OS/2, the command processor is started whenever you
  1058.              select the appropriate object on your OS/2 desktop.  If you
  1059.              don't want to use CMD.EXE as your command processor, you use
  1060.              the SET OS2_SHELL statement in CONFIG.SYS to specify a
  1061.              different command processor.  Because OS/2 includes the
  1062.              ability to run DOS programs, it also includes a copy of
  1063.              COMMAND.COM as its default DOS command processor.  You can
  1064.              change to a different DOS command processor with the SHELL
  1065.              statement in the OS/2 CONFIG.SYS file.
  1066.  
  1067.      4NT     Under Windows NT, there is no CONFIG.SYS file, and no special
  1068.              way to specify a default command processor.  Instead, you
  1069.              simply create a desktop object for any command processor you
  1070.              want to use.
  1071.  
  1072.  
  1073.              Primary and Secondary Shells
  1074.  
  1075.              Technically, the command processor is a shell:  a program that
  1076.              understands your commands and makes the correct calls to the
  1077.              underlying operating system to perform various tasks,
  1078.              including running programs.
  1079.  
  1080.      4DOS    Under DOS, the command processor that runs when the computer
  1081.              boots up, or when an OS/2 DOS session starts, is called the
  1082.              primary shell.
  1083.  
  1084.              Any command processor that is started as a "child" to a
  1085.              primary shell is a secondary shell.  Typically, secondary
  1086.              shells are started by application programs with a "shell to
  1087.              the command prompt" feature, and by multitasking environments
  1088.              like Windows or DESQView.  A secondary shell has most of the
  1089.              same features as a primary shell.
  1090.  
  1091.              There are a few differences between primary and secondary
  1092.              shells under DOS.  Generally, less memory is available when a
  1093.              secondary shell is running, because at least part of the
  1094.              program that started it is still in memory waiting to spring
  1095.              back to life when you exit.  And normally only the primary
  1096.              shell automatically executes the instructions in your
  1097.              AUTOEXEC.BAT file.
  1098.  
  1099.  
  1100.  
  1101.         -------------------------------------------------------------------
  1102.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 12
  1103.  
  1104.                                                CHAPTER 1 / GENERAL CONCEPTS
  1105.         -------------------------------------------------------------------
  1106.  
  1107.              Under DOS you can leave a secondary shell with the EXIT
  1108.              command, but there is normally no way to exit from the primary
  1109.              shell, because DOS requires a shell present to operate.
  1110.              However, if you are running 4DOS in a DOS session under OS/2
  1111.              version 2.0 or later you can use EXIT in the primary DOS shell
  1112.              to close the session and return to the OS/2 desktop.
  1113.  
  1114.      4OS2,   Under OS/2 and Windows NT, each 4OS2 or 4DOS/NT session that
  1115.      4NT     is started from the desktop is a primary shell.  Secondary
  1116.              shells are started by applications with a "shell to the
  1117.              command prompt" feature, and are also used for a special kind
  1118.              of communication between programs called a pipe (see page 53).
  1119.  
  1120.              Under 4OS2 and 4DOS/NT, you can exit from both primary and
  1121.              secondary shells.  When you exit from a primary shell, the
  1122.              command processor session is closed and you are returned to
  1123.              the desktop.
  1124.  
  1125.              You may also see the term shell used to describe programs
  1126.              which assist you in managing your files (for example XTree or
  1127.              Lotus Magellan for DOS, or Norton Commander for OS/2).  This
  1128.              is a different and less precise meaning of "shell" than the
  1129.              one used above and elsewhere in this manual.  Such programs
  1130.              are also sometimes called "visual shells" because they use a
  1131.              menu or graphical interface to receive commands.  Unlike 4DOS,
  1132.              4OS2, and 4DOS/NT, these programs are not command processors,
  1133.              and cannot replace COMMAND.COM or CMD.EXE.
  1134.  
  1135.              Each time 4DOS, 4OS2, or 4DOS/NT starts as either a primary or
  1136.              secondary shell, it looks for and executes one or more
  1137.              "automatic" batch files.  These files are explained on page
  1138.              82.
  1139.  
  1140.  
  1141.         Files and Directories
  1142.  
  1143.              You may have dozens, hundreds, or thousands of files stored on
  1144.              your computer's disks.  Your operating system is responsible
  1145.              for managing all of these files.  In order to do so, it uses a
  1146.              unique name to locate each file in much the same way that the
  1147.              post office assigns a unique address to every residence.
  1148.  
  1149.              The unique name of any file is composed of a drive letter, a
  1150.              directory path, and a filename.  Each of these parts of the
  1151.              file's name is case insensitive; you can mix upper and lower
  1152.              case letters in any way you wish.
  1153.  
  1154.  
  1155.  
  1156.  
  1157.         -------------------------------------------------------------------
  1158.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 13
  1159.  
  1160.                                                CHAPTER 1 / GENERAL CONCEPTS
  1161.         -------------------------------------------------------------------
  1162.  
  1163.              Drives and Volumes
  1164.  
  1165.              A drive letter designates which drive contains the file.  In a
  1166.              file's full name, the drive letter is followed by a colon.
  1167.              Drive letters A: and B: are normally reserved for the floppy
  1168.              disk drives.  (Systems with a single drive use both A: and B:
  1169.              for that drive.  The operating system asks you to swap
  1170.              diskettes as necessary to turn that single physical drive into
  1171.              two separate logical disk drives.)
  1172.  
  1173.              Normally, drive C: is the first (or only) hard disk drive.
  1174.              Later versions of DOS, some DOS-based utility programs, and
  1175.              both OS/2 and Windows NT can divide a large hard disk into
  1176.              multiple logical drives or volumes that are usually called C:,
  1177.              D:, E:, etc.  Also, the DOS and Windows NT utility SUBST lets
  1178.              you use drive letters as a substitute for directory names.
  1179.              Many network systems (LANs) use a similar feature to give
  1180.              drive letters to sections of the network file server drives.
  1181.  
  1182.              Some computers also have "RAM disks" (sometimes called
  1183.              "virtual disks"), which are areas of memory set aside by
  1184.              software (a "RAM disk driver") for use as fast but temporary
  1185.              storage.  RAM disks are also assigned drive letters, typically
  1186.              using letters beyond that used by the last hard disk in the
  1187.              system, but before any network drives.  For example, on a
  1188.              system with a large hard disk you might have A: and B: as
  1189.              floppy drives, C:, D:, and E: as parts of the hard disk, F: as
  1190.              a RAM disk, and G: and H: as network drives.
  1191.  
  1192.  
  1193.              File Systems
  1194.  
  1195.              Each disk volume is organized according to a file system.  The
  1196.              file system determines how files are named and how they are
  1197.              organized on the disk.  The DOS file system uses a File
  1198.              Allocation Table or FAT to keep track of each file, and
  1199.              therefore it is often called a FAT file system.  Both OS/2 and
  1200.              Windows NT also include support for the traditional FAT file
  1201.              system.
  1202.  
  1203.              OS/2 also supports the High Performance File System or HPFS.
  1204.              Windows NT can work with HPFS disk volumes plus volumes
  1205.              formatted with its own file system, which is called NTFS.
  1206.  
  1207.              The file system type (FAT, HPFS, or NTFS) is determined when a
  1208.              hard disk volume is formatted and applies to the entire
  1209.              volume.  For example, you might have a 200 MB hard disk
  1210.              divided into four 50 MB volumes, with the first three volumes
  1211.  
  1212.  
  1213.         -------------------------------------------------------------------
  1214.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 14
  1215.  
  1216.                                                CHAPTER 1 / GENERAL CONCEPTS
  1217.         -------------------------------------------------------------------
  1218.  
  1219.              (C:, D:, and E:) formatted for the FAT file system, and the
  1220.              fourth formatted for HPFS or NTFS.
  1221.  
  1222.              When you are using DOS, only files on FAT volumes are visible
  1223.              and available.  HPFS and NTFS volumes are completely
  1224.              inaccessible.  If you boot your system under OS/2, you can
  1225.              access FAT and HPFS volumes, both from OS/2 itself and from
  1226.              DOS sessions running under OS/2 (DOS sessions can only access
  1227.              files with FAT-compatible names; see page 17 for details).  If
  1228.              you boot under Windows NT, you can access FAT, HPFS, and NTFS
  1229.              volumes.
  1230.  
  1231.      4OS2    Finally, OS/2 also supports installable file systems, which
  1232.              are installed with the IFS= directive in the OS/2 CONFIG.SYS
  1233.              file.  The CD-ROM file system supplied with OS/2 2.x is an
  1234.              example of an installable file system, and many OS/2 networks
  1235.              are also implemented as installable file systems.
  1236.  
  1237.  
  1238.              Directories and Subdirectories
  1239.  
  1240.              A file system is a method of organizing all of the files on an
  1241.              entire disk or hard disk volume.  Directories are used to
  1242.              divide the files on a disk into logical groups that are easy
  1243.              to work with.  Their purpose is similar to the use of file
  1244.              drawers to contain groups of hanging folders, hanging folders
  1245.              to contain smaller manila folders, and so on.
  1246.  
  1247.              Every drive has a root or base directory, and many have one or
  1248.              more subdirectories.  Subdirectories can also have
  1249.              subdirectories, extending in a branching tree structure from
  1250.              the root directory.  The collection of all directories on a
  1251.              drive is often called the directory tree, and a portion of the
  1252.              tree is sometimes called a subtree.  The terms directory and
  1253.              subdirectory are typically used interchangeably to mean a
  1254.              single subdirectory within this tree structure.
  1255.  
  1256.              Subdirectory names follow the same naming rules as files in
  1257.              each operating system (see below).  However, under DOS it is
  1258.              best to use a name of 8 characters or less, without an
  1259.              extension, when naming subdirectories, because some
  1260.              application programs do not properly handle subdirectory names
  1261.              that have an extension.
  1262.  
  1263.              The drive and subdirectory portion of a file's name are
  1264.              collectively called the file's path.  For example, the file
  1265.              name C:\DIR1\DIR2\MYFILE.DAT says to look for the file
  1266.              MYFILE.DAT in the subdirectory DIR2 which is part of the
  1267.              subdirectory DIR1 which is on drive C.  The path for
  1268.  
  1269.         -------------------------------------------------------------------
  1270.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 15
  1271.  
  1272.                                                CHAPTER 1 / GENERAL CONCEPTS
  1273.         -------------------------------------------------------------------
  1274.  
  1275.              MYFILE.DAT is C:\DIR1\DIR2.  The backslashes between
  1276.              subdirectory names are required.  The total length of a file's
  1277.              path may not exceed 64 characters in DOS, and on FAT volumes
  1278.              under OS/2 and Windows NT.  (This limit excludes the file name
  1279.              and extension, but includes the drive letter and colon).  On
  1280.              HPFS and NTFS volumes, the path and file name must each be 255
  1281.              characters or less in length, and in addition the total length
  1282.              of the path and file name together cannot exceed 260
  1283.              characters.
  1284.  
  1285.              The operating system and command processor remember both a
  1286.              current or default drive for your system as a whole, and a
  1287.              current or default directory for every drive in your system.
  1288.              Whenever a program tries to create or access a file without
  1289.              specifying the file's path, the operating system uses the
  1290.              current drive (if no other drive is specified) and the current
  1291.              directory (if no other directory path is specified).
  1292.  
  1293.              The root directory is named using the drive letter and a
  1294.              single backslash.  For example, D:\ refers to the root
  1295.              directory of drive D:.  Using a drive letter with no directory
  1296.              name at all refers to the current directory on the specified
  1297.              drive.  For example, E:4DOS.DOC refers to the file 4DOS.DOC in
  1298.              the current directory on drive E:.
  1299.  
  1300.              There are also two special subdirectory names that are useful
  1301.              in many situations:  a single period [.] by itself means "the
  1302.              current default directory."  Two periods together [..] means
  1303.              "the directory which contains the current default directory"
  1304.              (often referred to as the parent directory).  These special
  1305.              names can be used wherever a full directory name can be used.
  1306.              4DOS, 4OS2, and 4DOS/NT allow you to use additional periods to
  1307.              specify directories further "up" the tree (see page 57).
  1308.  
  1309.  
  1310.              File Names
  1311.  
  1312.              Finally, each file has a filename.  Under the FAT file system,
  1313.              the filename consists of a base name of 1 to 8 characters plus
  1314.              an optional extension composed of a period plus 1 to 3 more
  1315.              characters.  You can use alphabetic and numeric characters
  1316.              plus the punctuation marks ! # $ % & ' ( ) - @ ^ _ ` { } and ~
  1317.              in both the base name and the extension.  Because the
  1318.              exclamation point [!], percent sign [%], caret [^], at sign
  1319.              [@], parentheses [()], and back-quote [`] also have other
  1320.              meanings to 4DOS, 4OS2, and 4DOS/NT, it is best to avoid using
  1321.              them in filenames.
  1322.  
  1323.  
  1324.  
  1325.         -------------------------------------------------------------------
  1326.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 16
  1327.  
  1328.                                                CHAPTER 1 / GENERAL CONCEPTS
  1329.         -------------------------------------------------------------------
  1330.  
  1331.              The HPFS file system, which can be used under OS/2 and Windows
  1332.              NT, allows file names with a maximum of 255 characters,
  1333.              including spaces and other characters that are not allowed in
  1334.              a FAT system file name, but excluding some punctuation
  1335.              characters which are allowed in FAT file names.  See your
  1336.              operating system documentation for details on the characters
  1337.              allowed.  If you use HPFS filenames which contain semicolons
  1338.              [;], see page 60 for details on avoiding problems with
  1339.              interpretation of the semicolon under 4OS2 and 4DOS/NT.
  1340.  
  1341.              The NTFS file system which can be used under Windows NT also
  1342.              allows file names with a maximum of 255 characters.
  1343.  
  1344.              HPFS and NTFS file names are always stored and displayed
  1345.              exactly as you entered them, and are not automatically shifted
  1346.              to upper or lower case.  For example, you could create a file
  1347.              called MYFILE, myfile, or MyFile, and each name would be
  1348.              stored in the directory just as you entered it.  However, case
  1349.              is ignored when looking for filenames, so you cannot have two
  1350.              files whose names differ only in case (i.e., the three names
  1351.              given above would all refer to the same file).  This behavior
  1352.              is sometimes described as "case-retentive but not case-
  1353.              sensitive" because the case information is retained, but does
  1354.              not affect access to the files.
  1355.  
  1356.              Files stored on HPFS and NTFS volumes often have "FAT-
  1357.              compatible" names:  names which contain only those characters
  1358.              legal on a FAT volume, and which meet the 8-character name /
  1359.              3-character extension limits.  Programs which cannot handle
  1360.              the long names supported by HPFS and NTFS (for example, DOS
  1361.              programs running under OS/2) generally can access files with
  1362.              FAT-compatible names.
  1363.  
  1364.      4DOS    4DOS is compatible with FAT volumes.  When running in a DOS
  1365.              session under OS/2, 4DOS can also access files on HPFS volumes
  1366.              and installable file system volumes (see below), provided the
  1367.              files have FAT-compatible names.  Files on such volumes which
  1368.              do not have FAT-compatible names will be invisible to 4DOS.
  1369.  
  1370.              If an HPFS or NTFS-compatible file name includes spaces or
  1371.              other characters that would not be allowed in a FAT name, you
  1372.              must place double quotes around the entire name.  For example,
  1373.              suppose you have a file named LET3 on a FAT volume, and you
  1374.              want to copy it to the LETTERS directory on drive F:, an HPFS
  1375.              partition, and give it the name Letter To Sara.  To do so, use
  1376.              either of these commands in 4OS2 or 4DOS/NT:
  1377.  
  1378.                   [c:\wp] copy let3 f:\LETTERS\"Letter To Sara"
  1379.                   [c:\wp] copy let3 "f:\LETTERS\Letter To Sara"
  1380.  
  1381.         -------------------------------------------------------------------
  1382.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 17
  1383.  
  1384.                                                CHAPTER 1 / GENERAL CONCEPTS
  1385.         -------------------------------------------------------------------
  1386.  
  1387.              HPFS and NTFS do not explicitly define an "extension" for file
  1388.              names which are not FAT-compatible.  However, the convention
  1389.              used by 4OS2 and 4DOS/NT (and by CMD.EXE) is to treat all
  1390.              characters after the last period in the file name as the
  1391.              extension.  For example, the file name "Letter to Sara" has no
  1392.              extension, whereas the name "Letter.to.Sara" has the extension
  1393.              Sara.
  1394.  
  1395.  
  1396.              File Attributes
  1397.  
  1398.              Each file also has attributes which define characteristics of
  1399.              the file which may be useful to the operating system, to you,
  1400.              or to an application program.  Attributes can be set with the
  1401.              ATTRIB command (see page 167) and viewed with the ATTRIB and
  1402.              DIR commands.
  1403.  
  1404.              Every time a program modifies a file, the operating system
  1405.              sets the Archive attribute, which signals that the file has
  1406.              been modified since it was last backed up.  This can be used
  1407.              by 4DOS, 4OS2, or 4DOS/NT to determine which files to COPY,
  1408.              and by backup programs to determine which files to back up.
  1409.  
  1410.              When the Read-only attribute is set, the file can't be changed
  1411.              or erased; this can be used to protect important files from
  1412.              damage.  The Hidden and System attributes prevent the file
  1413.              from appearing in normal directory listings.  The DIR command
  1414.              (see page 196) has options which allow you to select filenames
  1415.              to view based on their attributes, to view the attributes
  1416.              themselves, and to view information about normally "invisible"
  1417.              hidden and system files.
  1418.  
  1419.              When a file is created, and every time it is modified, the
  1420.              operating system records the system time and date in a time
  1421.              stamp in the file's directory entry.  Several 4DOS, 4OS2, and
  1422.              4DOS/NT commands and variable functions, and many backup and
  1423.              utility programs, use this time stamp to determine the
  1424.              relative ages of files.
  1425.  
  1426.  
  1427.         Internal and External Commands
  1428.  
  1429.              Whenever you type something at the command line and press the
  1430.              Enter key, you have given a command to the command processor,
  1431.              which must figure out how to execute your command.  If you
  1432.              understand the general process that 4DOS, 4OS2, and 4DOS/NT
  1433.              use, you will be able to make the best use of them and their
  1434.              commands.
  1435.  
  1436.  
  1437.         -------------------------------------------------------------------
  1438.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 18
  1439.  
  1440.                                                CHAPTER 1 / GENERAL CONCEPTS
  1441.         -------------------------------------------------------------------
  1442.  
  1443.              The command processor begins by dividing the line you typed
  1444.              into a command name and a command tail.  The command name is
  1445.              the first word in the command; the tail is everything that
  1446.              follows the command name.  For example, in this command line:
  1447.  
  1448.                   dir *.txt /2/p/v
  1449.  
  1450.              the command name is "dir", and the command tail is " *.txt
  1451.              /2/p/v."
  1452.  
  1453.              If the command name is not an alias (see page 74), the command
  1454.              processor tries to find the name in its list of internal
  1455.              commands.  An internal command is one that the command
  1456.              processor can perform itself, without running another program.
  1457.              DIR and COPY are examples of internal commands.
  1458.  
  1459.              If the command name is not found in the command processor's
  1460.              list of internal commands, it assumes that it must find and
  1461.              execute an external command.  This means that the command
  1462.              processor must load and run a separate program, either an
  1463.              executable program or a batch file.  DOS, OS/2, and Windows NT
  1464.              are shipped with a number of external utility programs (such
  1465.              as FORMAT and DISKCOPY), and any program or application you
  1466.              install on your system becomes a new external command.
  1467.  
  1468.              The advantage of internal commands is that they run almost
  1469.              instantly.  When you give an internal command, the command
  1470.              processor interprets the command line and carries out the
  1471.              necessary activities without having to look for, load, and run
  1472.              another program.
  1473.  
  1474.              The advantage of external commands is that they can be large,
  1475.              varied, and complex without taking space inside the system
  1476.              command processor.  External commands can also be renamed or
  1477.              replaced easily.  If you want to rename the external DOS
  1478.              command XCOPY to MYCOPY, for example, all you need to do is
  1479.              find the file called XCOPY.EXE on your DOS disk or directory
  1480.              and change its name to MYCOPY.EXE.  If you want to replace
  1481.              XCOPY with a more efficient program, you can do so.  4DOS,
  1482.              4OS2, and 4DOS/NT add this flexibility to internal commands.
  1483.              You can rename or replace any internal command by using an
  1484.              alias (see pages 74 and 155), and you can enable or disable
  1485.              internal commands whenever you wish (see SETDOS /I on page
  1486.              310).
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.         -------------------------------------------------------------------
  1494.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 19
  1495.  
  1496.                                                CHAPTER 1 / GENERAL CONCEPTS
  1497.         -------------------------------------------------------------------
  1498.  
  1499.         Executable Files and File Searches
  1500.  
  1501.              Once the command processor knows that it is supposed to run an
  1502.              external command, it tries to find an executable file (one
  1503.              with a .COM or .EXE extension) whose name matches the command
  1504.              name.  It runs the executable file if it finds one.  (See the
  1505.              previous section for more information on external commands.)
  1506.  
  1507.              If the command processor cannot find an external program to
  1508.              run, it next looks for a batch file (a file with one or more
  1509.              commands in it) whose name matches the command name.  4DOS
  1510.              recognizes a file as a batch file if its extension is .BAT or
  1511.              .BTM.  4OS2 recognizes .CMD, .BTM, and .BAT as batch file
  1512.              extensions.  It will run .CMD and .BTM files itself, and will
  1513.              start a DOS session to run .BAT files.  4DOS/NT can run batch
  1514.              files with a .BAT, .CMD, or .BTM extension.  If the command
  1515.              processor finds such a file, it then reads each line in the
  1516.              file as a new command.
  1517.  
  1518.              If the search for a batch file fails, the command processor
  1519.              checks to see if the command name matches the name of a file
  1520.              with an extension that you have defined as executable.  If a
  1521.              match is found, the command processor runs the program you
  1522.              specified when you defined the executable extension.
  1523.              (Executable extensions are used to associate file extensions
  1524.              with the specific program that processes a particular type of
  1525.              file; see page 66 for details).
  1526.  
  1527.              4DOS, 4OS2, and 4DOS/NT first search for an executable
  1528.              program, a batch file, and a file with an executable extension
  1529.              in the current directory.  If the command name doesn't match a
  1530.              .COM, .EXE, .BTM, .BAT or .CMD file or an executable extension
  1531.              in the current directory, the command processor repeats its
  1532.              search in every directory in your search path.
  1533.  
  1534.              The search path is a list of directories that the command
  1535.              processor (and some applications) search for executable files.
  1536.              For example, if you wanted the command processor to search the
  1537.              root directory of the C: drive, the \DOS subdirectory on the
  1538.              C: drive, and the \UTIL directory on the D: drive for
  1539.              executable files, your search path would look like this:
  1540.  
  1541.                   PATH=C:\;C:\DOS;C:\UTIL
  1542.  
  1543.              Notice that the directory names in the search path are
  1544.              separated by semicolons.
  1545.  
  1546.              You can create or view the search path with the PATH command
  1547.              (see page 276).  You can use the ESET command (see page 218)
  1548.  
  1549.         -------------------------------------------------------------------
  1550.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 20
  1551.  
  1552.                                                CHAPTER 1 / GENERAL CONCEPTS
  1553.         -------------------------------------------------------------------
  1554.  
  1555.              to edit the path.  Many programs also use the search path to
  1556.              find their own files.  The search path is stored in the
  1557.              environment with the name PATH.
  1558.  
  1559.              Remember, the command processor always looks for an executable
  1560.              file or a file with an executable extension first in the
  1561.              current subdirectory, and then in each directory in the search
  1562.              path.  (You can change the search order so the current
  1563.              directory is not searched first; see the PATH command for
  1564.              details.)
  1565.  
  1566.              If you include an extension as part of the command name, the
  1567.              command processor only searches for a file with that
  1568.              extension.  For example, if you enter the command WP, 4DOS,
  1569.              4OS2, or 4DOS/NT will search for any executable file whose
  1570.              base name is WP.  However, if you enter WP.EXE as the command
  1571.              name, the command processor will search the current directory
  1572.              and each directory in your search path for WP.EXE, but will
  1573.              not look for files with other extensions.
  1574.  
  1575.              If the command processor cannot find an executable file, batch
  1576.              program, or a file with an executable extension in the current
  1577.              directory or any directory in the search path, it looks for an
  1578.              alias called UNKNOWN_CMD (see ALIAS on page 155 for details).
  1579.              If you have defined an alias with that name, it is executed.
  1580.              Otherwise, the command processor displays an "Unknown command"
  1581.              error message and waits for your next instruction.
  1582.  
  1583.  
  1584.         The Environment
  1585.  
  1586.              The command processor allows you to keep a list of information
  1587.              in memory.  This list is called the environment.  Every
  1588.              program receives a copy of the environment when it begins, and
  1589.              many programs use some of its information to configure
  1590.              themselves or to find files.
  1591.  
  1592.              The environment is arranged as a series of variables and their
  1593.              related values.  Each variable is a name stored in upper case.
  1594.              The name is followed by an equal sign [=] and some text.  You
  1595.              can view the environment by typing SET, and add new entries or
  1596.              edit existing entries with the SET and ESET commands.  You can
  1597.              erase entries in the environment with both the UNSET and SET
  1598.              commands.
  1599.  
  1600.              A typical environment entry looks like this:
  1601.  
  1602.                   LIB=c:\lib
  1603.  
  1604.  
  1605.         -------------------------------------------------------------------
  1606.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 21
  1607.  
  1608.                                                CHAPTER 1 / GENERAL CONCEPTS
  1609.         -------------------------------------------------------------------
  1610.  
  1611.              In this example, the name of the variable is "LIB" and its
  1612.              value is "c:\lib".  The text string or value can include any
  1613.              characters except nulls (ASCII 0).
  1614.  
  1615.              The format and meaning of each entry in the environment is up
  1616.              to the program that uses the particular variable.  Environment
  1617.              variables can contain just about anything, and can be used for
  1618.              any purpose the author of a program desires.  The "purpose" of
  1619.              the environment as a whole is simply to hold small amounts of
  1620.              text which programs can then access according to their own
  1621.              rules.  Most environment variables are used by single programs
  1622.              for their own information; a few have well-defined meanings
  1623.              and are used by many different programs.
  1624.  
  1625.              4DOS, 4OS2, and 4DOS/NT use several environment variables to
  1626.              control their own behavior.  They also provide a wide range of
  1627.              facilities for manipulating and managing the environment.  See
  1628.              "Using the Environment" beginning on page 94 for details about
  1629.              these special variables, the size of the environment, and
  1630.              other environment-related features.
  1631.  
  1632.  
  1633.         ASCII and Key Codes
  1634.  
  1635.              Internally, computers use numbers for everything.  To
  1636.              represent the text that you type, a computer must translate
  1637.              each letter to and from a number.  For all PC-compatible
  1638.              computers, the code used for this translation is called ASCII
  1639.              (American Standard Code for Information Interchange).  ASCII
  1640.              codes are used both for the characters you type and for the
  1641.              characters that are displayed on the screen.
  1642.  
  1643.              The original ASCII code has 128 values for upper and lower
  1644.              case letters, numerals, punctuation marks, and control codes
  1645.              (control codes correspond to pressing the Ctrl key plus
  1646.              another character).  Some control codes are represented on the
  1647.              keyboard with such keys as Tab, Enter, Backspace, and Esc.
  1648.              IBM, in its original PC, defined an additional 128 extended
  1649.              ASCII codes for math symbols, international characters, the
  1650.              line characters used to draw boxes, and some miscellaneous
  1651.              symbols.  You can enter extended ASCII codes on the keyboard
  1652.              by holding down the Alt key while you type the code number on
  1653.              the numeric key pad.
  1654.  
  1655.              The symbol that the computer displays for each ASCII and
  1656.              extended ASCII code, and the code generated by each key on the
  1657.              keyboard, depends in part on the country and language support
  1658.              that your computer is configured to use.  Through the use of
  1659.              code pages in DOS and OS/2, and the Registry in Windows NT,
  1660.  
  1661.         -------------------------------------------------------------------
  1662.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 22
  1663.  
  1664.                                                CHAPTER 1 / GENERAL CONCEPTS
  1665.         -------------------------------------------------------------------
  1666.  
  1667.              your computer can be configured for use in most countries.
  1668.              See your operating system documentation for more information
  1669.              about country and language support.
  1670.  
  1671.              Do not confuse extended ASCII with extended key codes.  The
  1672.              latter include special codes that the computer generates when
  1673.              you press a function key, cursor key, or Alt plus a letter
  1674.              (see below).  Those keys do not have any representation in
  1675.              either the ASCII or extended ASCII code systems.  Another set
  1676.              of key codes, called scan codes, is discussed in the section
  1677.              on the keyboard below.
  1678.  
  1679.              Appendix B on page 357 has a complete list of ASCII, extended
  1680.              ASCII, and extended key codes.
  1681.  
  1682.  
  1683.         The Keyboard
  1684.  
  1685.              When you press a single key or a key combination on the
  1686.              keyboard, the computer translates your keystroke into two
  1687.              numbers.  For all alphabetic, numeric, and punctuation keys,
  1688.              the Tab, Enter, Backspace, Esc keys and Ctrl plus an
  1689.              alphabetic key, these numbers are an ASCII code plus a scan
  1690.              code.  The ASCII code represents the key's meaning; the scan
  1691.              code identifies which specific key was pressed.  For example,
  1692.              many keyboards have two plus [+] keys, one above the equal
  1693.              sign and one on the numeric keypad.  Both generate the same
  1694.              ASCII code, but they generate different scan codes.
  1695.  
  1696.              Keys which are not represented by ASCII codes are translated
  1697.              to an ASCII 0 plus an extended key code.  These keys include
  1698.              the function keys, the cursor keys, and Alt plus a key.  The
  1699.              extended key code for a key is generally the same as the scan
  1700.              code for that key.
  1701.  
  1702.              Some keys, like the Alt, Ctrl, and Shift by themselves or in
  1703.              combination with each other, plus Print Screen, SysReq, Scroll
  1704.              Lock, Pause, Break, Num Lock, and Caps Lock, do not have any
  1705.              code representations at all.  The computer performs special
  1706.              actions automatically when you press these keys (for example,
  1707.              it switches your keyboard into Caps Lock mode when you press
  1708.              the Caps Lock key), and does not report the keystrokes to
  1709.              whatever program is running unless the program has been
  1710.              written specially to accept them.
  1711.  
  1712.              Appendix B has a complete list of ASCII and scan codes for the
  1713.              keys on most keyboards.
  1714.  
  1715.  
  1716.  
  1717.         -------------------------------------------------------------------
  1718.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 23
  1719.  
  1720.                                                CHAPTER 1 / GENERAL CONCEPTS
  1721.         -------------------------------------------------------------------
  1722.  
  1723.         Video
  1724.  
  1725.              4DOS, 4OS2, and 4DOS/NT are "character-based" programs, which
  1726.              means they work in text mode on your computer.  In text mode,
  1727.              the screen or window used by the program displays text in a
  1728.              single, fixed-pitch font (a font where every character is the
  1729.              same width), but cannot mix fonts or display graphics.  All
  1730.              three command processors can run graphics programs which
  1731.              change your screen to graphics mode, but the screen must be
  1732.              returned to text mode whenever the command processor is
  1733.              active.  In the early days of the IBM PC, text mode was a
  1734.              single, simple video operating environment.  Today, advanced
  1735.              video boards and video software have created a wide range of
  1736.              text modes.
  1737.  
  1738.              The original IBM PC monochrome and CGA color video cards can
  1739.              display 80 columns and 25 rows of text.  Newer, advanced video
  1740.              systems normally run in this 80 x 25 display mode but can also
  1741.              display more columns and rows.  For example, EGA video cards
  1742.              can display 43 rows of text and VGA video cards can display 50
  1743.              rows.  With special driver programs, a VGA can display 60 rows
  1744.              or more and up to 132 columns of text.  Each of these
  1745.              different screen configurations is a different text mode.
  1746.  
  1747.              In addition to running in a variety of text modes, 4DOS, 4OS2,
  1748.              and 4DOS/NT can run in "normal" full-screen mode or in a
  1749.              window inside a graphical environment such as the Windows or
  1750.              Windows NT desktop, or the OS/2 Workplace Shell.  When they
  1751.              run in such a window, they are still operating in text mode.
  1752.              The underlying graphical environment translates their text
  1753.              commands into the appropriate graphics for your video display.
  1754.  
  1755.              4DOS, 4OS2, and 4DOS/NT support whatever number of rows and
  1756.              columns of text you decide to use.  They don't have commands
  1757.              to switch from one screen size to another - you will need to
  1758.              use the software that came with your computer or video board
  1759.              to do that - but they can read and work with the number of
  1760.              rows and columns on your screen.
  1761.  
  1762.  
  1763.         ANSI Drivers
  1764.  
  1765.      4DOS    Every version of DOS includes a program called ANSI.SYS.  This
  1766.              program lets you use text colors other than drab white on
  1767.              black, redefine keys, and control screen output.  Commercial
  1768.              ANSI drivers are available as replacements for ANSI.SYS.  The
  1769.              commercial programs usually include many new features, boost
  1770.              screen display speed dramatically, and support text displays
  1771.              that have more than 80 columns and 25 lines.
  1772.  
  1773.         -------------------------------------------------------------------
  1774.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 24
  1775.  
  1776.                                                CHAPTER 1 / GENERAL CONCEPTS
  1777.         -------------------------------------------------------------------
  1778.  
  1779.              In most cases, 4DOS automatically determines whether you have
  1780.              an ANSI driver installed (if the automatic determination does
  1781.              not work on your system you can set the ANSI state manually).
  1782.              If you do have an ANSI driver installed, 4DOS will use the
  1783.              driver to clear the screen and set screen colors.
  1784.  
  1785.      4OS2    OS/2 includes ANSI support for character mode sessions.  4OS2
  1786.              enables this feature when it starts, and assumes that it
  1787.              remains enabled.  You can turn off ANSI support with OS/2's
  1788.              external ANSI command (ANSI.EXE).  If you do, however, 4OS2
  1789.              will not notice the change and will display unusual characters
  1790.              or ignore colors in your CLS and COLOR commands.
  1791.  
  1792.      4NT     There is no provision for ANSI support in Windows NT, and
  1793.              4DOS/NT always assumes that no ANSI driver is present.
  1794.  
  1795.              Several 4DOS, 4OS2, and 4DOS/NT commands provide replacements
  1796.              for traditional ANSI commands.  For example, there are
  1797.              commands to set the screen colors and display text in specific
  1798.              colors.  These commands are easier to understand and use than
  1799.              the traditional ANSI control sequences.  Some of these
  1800.              commands manipulate screen colors directly.  Others use an
  1801.              ANSI driver if one is installed (under 4DOS) or expected
  1802.              (under 4OS2), but save you the work of figuring out complex
  1803.              ANSI control sequences.  Any special interaction between 4DOS
  1804.              or 4OS2 and the ANSI driver is described in the documentation
  1805.              for each command.
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.         -------------------------------------------------------------------
  1830.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 25
  1831.  
  1832.                                                     CHAPTER 2 / CONVENTIONS
  1833.         -------------------------------------------------------------------
  1834.  
  1835.  
  1836.         CHAPTER 2 / CONVENTIONS
  1837.  
  1838.  
  1839.         This chapter contains information about three conventions that are
  1840.         used throughout 4DOS, 4OS2, and 4DOS/NT:  colors and color names,
  1841.         color-coded directories, and keys and key names.  These topics are
  1842.         combined here in a central reference spot so that they will be easy
  1843.         to find when you need to refer to them.  You will find cross
  1844.         references to this chapter in several other parts of this manual.
  1845.  
  1846.  
  1847.         Colors and Color Names
  1848.  
  1849.              You can use color names in several of the directives in the
  1850.              .INI file and in many commands.  The general form of a color
  1851.              name is:
  1852.  
  1853.                   [BRIght] [BLInk] fg ON [BRIght] bg [BORder bc]
  1854.  
  1855.              where fg is the foreground or text color, bg is the background
  1856.              color, and bc is the border color.
  1857.  
  1858.              The available colors are:
  1859.  
  1860.                   Black        Blue         Green          Red
  1861.                   Magenta      Cyan         Yellow         White
  1862.  
  1863.              Color names and the words BRIght, BLInk, and BORder may be
  1864.              shortened to the first 3 letters.  BORder is valid only in
  1865.              4DOS and 4OS2.
  1866.  
  1867.              There are several subtleties that complicate the use of colors
  1868.              and color names.  In order to understand them, you will need
  1869.              to read through the restrictions described below.  You may
  1870.              also want to review the Video section in the previous chapter
  1871.              (see page 24).  These restrictions are due to the design of
  1872.              your PC video hardware, BIOS, and video drivers, and are not
  1873.              inherent in 4DOS, 4OS2, or 4DOS/NT.  Some of the restrictions
  1874.              are complex, so feel free to skip over those that do not apply
  1875.              to color combinations you use.
  1876.  
  1877.              Some restrictions depend on the display "mode."  4DOS, 4OS2,
  1878.              and 4DOS/NT can run in either normal display mode, when the
  1879.              command processor is using the full screen and has more direct
  1880.              control over the video hardware; or in windowed display mode,
  1881.              when the command processor appears in a window as part of a
  1882.              graphical display under Windows 3.x, OS/2, or Windows NT.
  1883.  
  1884.  
  1885.         -------------------------------------------------------------------
  1886.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 26
  1887.  
  1888.                                                     CHAPTER 2 / CONVENTIONS
  1889.         -------------------------------------------------------------------
  1890.  
  1891.              Monochrome Video Adapters
  1892.  
  1893.              If you have a monochrome video adapter, you cannot display any
  1894.              colors except white and black in either normal or bright
  1895.              intensity.  If you have a color video adapter, you can use any
  1896.              of the standard colors listed above (provided you meet the
  1897.              other restrictions below).
  1898.  
  1899.  
  1900.              Color Errors
  1901.  
  1902.              A standard color specification allows sixteen foreground and
  1903.              eight background colors (sixteen if bright backgrounds are
  1904.              enabled, see below).  However, most video adapters and
  1905.              monitors do not provide true renditions of certain colors.
  1906.              For example, most users see normal "yellow" as brown, and
  1907.              bright yellow as yellow; many also see normal red as red, and
  1908.              "bright red" as pink.  Color errors are often much worse when
  1909.              running in windowed mode (see above), because the graphical
  1910.              environment that created the window may not map the text-mode
  1911.              colors the way you expect.  These problems are inherent in the
  1912.              monitor, video adapter, and driver software.  They cannot be
  1913.              corrected using 4DOS, 4OS2, or 4DOS/NT color specifications.
  1914.  
  1915.  
  1916.              Border Colors
  1917.  
  1918.              In order to use border colors, you must have a color video
  1919.              adapter (monochrome adapters do not support border colors).
  1920.  
  1921.      4NT     4DOS/NT does not support border colors, and will ignore the
  1922.              BORder keyword.
  1923.  
  1924.      4DOS,   4DOS and 4OS2 can only accept border colors in the CLS and
  1925.      4OS2    COLOR commands, and in the StdColors directive in the .INI
  1926.              file.  Border colors will be ignored, or will cause an error,
  1927.              if they are used elsewhere.
  1928.  
  1929.              Border colors do not work in windowed mode, and will be
  1930.              ignored if used in a windowed session under Windows or OS/2.
  1931.  
  1932.  
  1933.              Blinking Text and Bright Background Colors
  1934.  
  1935.              The interactions between blinking characters, bright
  1936.              backgrounds, and your display mode can be complex.  You will
  1937.              need to understand them if you use either attribute in your
  1938.              color specifications.
  1939.  
  1940.  
  1941.         -------------------------------------------------------------------
  1942.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 27
  1943.  
  1944.                                                     CHAPTER 2 / CONVENTIONS
  1945.         -------------------------------------------------------------------
  1946.  
  1947.              Bright background colors are only available if you have an
  1948.              EGA- or VGA-compatible display adapter.  If you have a
  1949.              monochrome or CGA adapter, you can use blinking displays and
  1950.              ignore the interactions described below.
  1951.  
  1952.              The effects of blinking and bright background color
  1953.              specifications depend partly on whether you are in normal or
  1954.              windowed display mode.
  1955.  
  1956.  
  1957.              Normal Display Mode
  1958.  
  1959.              In normal, full-screen display mode your video hardware can be
  1960.              configured via software commands to display either blinking
  1961.              text, or text with a bright background, but not both.  This is
  1962.              due to the design of PC video hardware, and is not a software
  1963.              restriction.
  1964.  
  1965.              The memory on your video adapter includes a "flag" for each
  1966.              character on the screen.  The flag controls blinking text and
  1967.              bright background colors.  If the flag is off, the character
  1968.              is displayed with a normal background and does not blink.  If
  1969.              the flag is "on," the character either blinks or is displayed
  1970.              with a bright background, depending on which way your video
  1971.              adapter is currently configured.
  1972.  
  1973.      4DOS,   In normal display mode, the configuration of your video
  1974.      4OS2    adapter can be controlled by 4DOS and 4OS2 with the BrightBG
  1975.              directive in the 4DOS.INI file (see page 135) or the SETDOS /B
  1976.              command (page 309).  If you set BrightBG = No or use the
  1977.              SETDOS /B0 command, 4DOS and 4OS2 will configure the video
  1978.              adapter for blinking text, and characters with the blink /
  1979.              bright background flag set will blink.  If you set BrightBG =
  1980.              Yes or use SETDOS /B1, 4DOS and 4OS2 will configure the video
  1981.              adapter for bright background colors, and the characters will
  1982.              be displayed with a bright background instead.
  1983.  
  1984.      4NT     BrightBG and SETDOS /B are not available under 4DOS/NT,
  1985.              because Windows NT always enables bright backgrounds and
  1986.              disables blinking text.
  1987.  
  1988.              Because there is only one flag for each character to specify
  1989.              both blinking text and bright background color, it doesn't
  1990.              matter which attribute you use when you specify the color.
  1991.              Whether you specify blinking text or a bright background, you
  1992.              will see the same thing on your screen.  For example, these
  1993.              two COLOR commands will always produce the same results:
  1994.  
  1995.                   color blink white on blue
  1996.  
  1997.         -------------------------------------------------------------------
  1998.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 28
  1999.  
  2000.                                                     CHAPTER 2 / CONVENTIONS
  2001.         -------------------------------------------------------------------
  2002.  
  2003.                   color white on bright blue
  2004.  
  2005.              If bright backgrounds are enabled, both commands will produce
  2006.              white text on a bright blue background.  If blinking text is
  2007.              enabled, both commands will produce blinking white text on a
  2008.              blue background.
  2009.  
  2010.              If you don't use BrightBG or SETDOS /B, 4DOS and 4OS2 will not
  2011.              attempt to configure your video hardware.  Most video adapters
  2012.              default to blinking text in normal mode, but this can be
  2013.              changed by application programs.  If you use BrightBG or
  2014.              SETDOS /B, 4DOS and 4OS2 will configure the hardware each time
  2015.              they display the prompt.
  2016.  
  2017.              The method used to adjust the video hardware may not be
  2018.              compatible with all video cards.  If you see screen "flashes"
  2019.              at each prompt when you use BrightBG or SETDOS /B, discontinue
  2020.              using both commands.  This problem is very rare and is not
  2021.              likely to occur on standard EGA and VGA systems.
  2022.  
  2023.  
  2024.              Windowed Mode
  2025.  
  2026.              In windowed mode, the command processor cannot control your
  2027.              hardware to select blinking or bright backgrounds.  Instead,
  2028.              Windows, OS/2, and Windows NT all display bright background
  2029.              colors, regardless of the BrightBG or SETDOS /B setting.  They
  2030.              do not provide a way to display blinking characters in
  2031.              windowed mode.  As an example, the two commands given above
  2032.              would both display white text on a bright blue background when
  2033.              run in windowed mode.
  2034.  
  2035.  
  2036.              Switching Modes
  2037.  
  2038.              Windows and OS/2 allow you to switch any DOS session between
  2039.              full-screen and windowed mode; Windows NT allows you to switch
  2040.              modes for any console (non-graphical) session.  For example,
  2041.              when running 4DOS in a DOS session under Windows, you can
  2042.              switch modes by pressing Alt-Enter.  Switching modes will
  2043.              usually alter color rendition, as you switch between direct
  2044.              interaction with the video board (in full-screen mode) and the
  2045.              color mapping provided by your graphical environment (in
  2046.              windowed mode).  In addition, switching modes may alter the
  2047.              display of blinking text and bright background characters.
  2048.  
  2049.      4DOS    Under 4DOS, if BrightBG is set to Yes, bright background
  2050.              colors will be preserved when you switch modes.  However, if
  2051.              BrightBG is set to No, the display will shift from blinking
  2052.  
  2053.         -------------------------------------------------------------------
  2054.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 29
  2055.  
  2056.                                                     CHAPTER 2 / CONVENTIONS
  2057.         -------------------------------------------------------------------
  2058.  
  2059.              text in the full-screen mode to bright background colors
  2060.              behind that text in the windowed mode.  This effect can be
  2061.              disturbing; you may need to take it into account if you write
  2062.              batch files or aliases which may be used in either mode.
  2063.  
  2064.      4OS2    You cannot switch modes for OS/2 sessions, so 4OS2 is not
  2065.              directly affected by mode switching.  However, if you write
  2066.              batch files or aliases which run in both modes, you may need
  2067.              to take into account that OS/2 defaults to displaying blinking
  2068.              text in full-screen mode and bright backgrounds in windowed
  2069.              mode.
  2070.  
  2071.  
  2072.         Color-Coded Directories
  2073.  
  2074.              The DIR and SELECT commands can display each file name in a
  2075.              different color, depending on the file's extension.
  2076.  
  2077.              To choose the DIR and SELECT display colors, you must either
  2078.              use the SET command to create an environment variable called
  2079.              COLORDIR, or use the ColorDir directive in your .INI file.
  2080.  
  2081.              If you do not use the COLORDIR variable or the ColorDir
  2082.              directive, DIR will use the default screen colors and SELECT
  2083.              will use the default screen colors or those set with the
  2084.              SelectColors directive.
  2085.  
  2086.              If you use both the COLORDIR variable and the ColorDir
  2087.              directive, the environment variable will override the settings
  2088.              in your .INI file.  You may find it useful to use the COLORDIR
  2089.              variable for experimenting, then to set permanent directory
  2090.              colors with the ColorDir directive.
  2091.  
  2092.              The format for both the COLORDIR environment variable and the
  2093.              ColorDir directive in the .INI file is:
  2094.  
  2095.                   ext ... :ColorName; ...
  2096.  
  2097.              where "ext" is a file extension (which may include wildcards)
  2098.              or one of the following file types:
  2099.  
  2100.                   DIRS      Directories
  2101.                   RDONLY    Read-only files
  2102.                   HIDDEN    Hidden files
  2103.                   SYSTEM    System files
  2104.                   ARCHIVE   Files modified since the last backup
  2105.  
  2106.              and "ColorName" is any valid color name (see page 26 for
  2107.              information on color names).
  2108.  
  2109.         -------------------------------------------------------------------
  2110.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 30
  2111.  
  2112.                                                     CHAPTER 2 / CONVENTIONS
  2113.         -------------------------------------------------------------------
  2114.  
  2115.              Unlike most color specifications, the background portion of
  2116.              the color name may be left out for directory colors.  If you
  2117.              don't specify a background color, DIR and SELECT will use the
  2118.              current screen background color.
  2119.  
  2120.              For example, to display the .COM and .EXE files in red on the
  2121.              current background, the .C and .ASM files in bright cyan on
  2122.              the current background, and the read-only files in blinking
  2123.              green on white (this should be entered on one line):
  2124.  
  2125.                   c:\> set colordir=com exe:red; c asm:bright cyan;
  2126.                        rdonly:blink green on white
  2127.  
  2128.              Extended wildcards (for example "BA[KXC]" for .BAK, .BAX, and
  2129.              .BAC files) can be used in directory color specifications.
  2130.              See page 57 for more information on extended wildcards.
  2131.  
  2132.      4DOS ## 4DOS normally writes text directly to the screen when
  2133.              displaying color-coded directories.  If you have an unusual
  2134.              display adapter which does not support direct video output,
  2135.              see the OutputBIOS directive on page 143.
  2136.  
  2137.  
  2138.         Keys and Key Names
  2139.  
  2140.              Key names are used to define keystroke aliases, in several of
  2141.              the .INI file directives, and with the 4DOS KEYSTACK command.
  2142.              The format of a key name is the same in all three uses:
  2143.  
  2144.                   [Prefix-]Keyname
  2145.  
  2146.              The key prefix can be left out, or it can be any one of the
  2147.              following:
  2148.  
  2149.                   Alt    followed by A - Z, 0 - 9, F1 - F12, or Bksp
  2150.                   Ctrl   followed by A - Z, F1 - F12, Tab, Bksp, Enter,
  2151.                          Left, Right, Home, End, PgUp, PgDn, Ins, or Del
  2152.                   Shift  followed by F1 - F12 or Tab.
  2153.  
  2154.              The possible key names are:
  2155.  
  2156.                   A - Z        Enter        PgDn
  2157.                   0 - 9        Up           Home
  2158.                   F1 - F12     Down         End
  2159.                   Esc          Left         Ins
  2160.                   Bksp         Right        Del
  2161.                   Tab          PgUp
  2162.  
  2163.  
  2164.  
  2165.         -------------------------------------------------------------------
  2166.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 31
  2167.  
  2168.                                                     CHAPTER 2 / CONVENTIONS
  2169.         -------------------------------------------------------------------
  2170.  
  2171.              All key names must be spelled as shown.  Alphabetic keys can
  2172.              be specified in upper-case or lower-case.  You cannot specify
  2173.              a punctuation key.
  2174.  
  2175.              The prefix and key name must be separated by a dash [-].  For
  2176.              example:
  2177.  
  2178.                   Alt-F10        This is okay
  2179.                   Alt F10        The space will cause an error
  2180.  
  2181.              If you prefer, you can use a numeric value instead of a key
  2182.              name.  Use the ASCII code for an ASCII, extended ASCII, or
  2183.              control character.  Use the scan code preceded by an at sign
  2184.              [@] for extended key codes like F1 or the cursor keys.  For
  2185.              example, use 13 for Enter, or @59 for F1.  In general, you
  2186.              will find it easier to use the names described above rather
  2187.              than key numbers.  See Appendix B (page 357) for an
  2188.              explanation and list of ASCII and key codes.
  2189.  
  2190.              Some keys are intercepted by your operating system or BIOS and
  2191.              are not passed on to 4DOS, 4OS2, or 4DOS/NT.  For example,
  2192.              under DOS Ctrl-S pauses screen output temporarily, and on some
  2193.              systems Ctrl-P toggles Print Echo mode (where text displayed
  2194.              on the screen is automatically echoed to the printer).  Keys
  2195.              which are intercepted by the operating system or BIOS
  2196.              generally cannot be assigned to aliases or with key mapping
  2197.              directives, because the command processor never receives these
  2198.              keystrokes and therefore cannot act on them.
  2199.  
  2200.              You also may not be able to use certain keys if your keyboard
  2201.              is not 100% IBM-compatible, your keyboard driver does not
  2202.              support them, or, under DOS, if you have an ANSI driver which
  2203.              does not support them.  For example, on some systems the F11
  2204.              and F12 keys are not recognized; others may not support
  2205.              unusual combinations like Ctrl-Tab.  These problems are rare;
  2206.              when they do occur, they are usually due to the operating
  2207.              system and/or your ANSI driver, and not to any problem with
  2208.              4DOS, 4OS2, or 4DOS/NT.
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.         -------------------------------------------------------------------
  2222.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 32
  2223.  
  2224.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2225.         -------------------------------------------------------------------
  2226.  
  2227.  
  2228.         CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2229.  
  2230.  
  2231.         4DOS, 4OS2, and 4DOS/NT are both a collection of commands and a set
  2232.         of features which make your computer easier to use.  The commands
  2233.         are explained in the Command Reference section which begins on page
  2234.         146.  This chapter explains each of the features that are not
  2235.         directly related to individual commands.
  2236.  
  2237.         Most of the features described in this section are easy to use, but
  2238.         a few are more technical in nature.  Such features are marked with
  2239.         a ## next to the feature name or the paragraph which describes the
  2240.         feature's operation.
  2241.  
  2242.         As you read through this section, we urge you to experiment with
  2243.         the features that catch your interest and pass over any which seem
  2244.         too complicated.  Come back to this section as you gain expertise,
  2245.         and you will probably discover that the more complex features will
  2246.         seem easy and very useful.  You don't need to learn any more than
  2247.         you want, and even if you are a computer novice, you'll find some
  2248.         features that will interest you immediately.
  2249.  
  2250.         If you come across terms or concepts in this chapter that you are
  2251.         unsure about, refer to Chapter 1 / General Concepts, the Glossary
  2252.         on page 368, or the Index.
  2253.  
  2254.  
  2255.         At the Command Line
  2256.  
  2257.              4DOS displays a c:\> prompt when it is waiting for you to
  2258.              enter a command.  4OS2 and 4DOS/NT display the similar [c:\]
  2259.              prompt.  (In each case, the actual text depends on the current
  2260.              drive and directory as well as your PROMPT settings.)  This is
  2261.              called the command line and the prompt is asking you to enter
  2262.              a command, an alias or batch file name, or the instructions
  2263.              necessary to begin an application program.
  2264.  
  2265.              This section of the manual explains the features that will
  2266.              help you while you are typing in commands, and how keystrokes
  2267.              are interpreted when you enter them at the command line.  The
  2268.              keystrokes discussed here are the ones normally used by 4DOS,
  2269.              4OS2, and 4DOS/NT.  If you prefer using different keystrokes
  2270.              to perform these functions, you can assign new ones with
  2271.              keystroke directives in the .INI file (see page 120).
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.         -------------------------------------------------------------------
  2278.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 33
  2279.  
  2280.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2281.         -------------------------------------------------------------------
  2282.  
  2283.              Command-Line Editing
  2284.  
  2285.              The command line works like a single-line word processor,
  2286.              allowing you to edit any part of the command at any time
  2287.              before you press Enter to execute it, or Esc to erase it.
  2288.  
  2289.              The command line extends to a maximum of 255 characters under
  2290.              4DOS and 1023 characters under 4OS2 and 4DOS/NT.
  2291.  
  2292.              You can use the following editing keys when you are typing a
  2293.              command (the words Ctrl and Shift mean to press the Ctrl or
  2294.              Shift key together with the other key named):
  2295.  
  2296.              Cursor Movement:
  2297.  
  2298.                   Left arrow          Move the cursor left one character.
  2299.                   Right arrow         Move the cursor right one character.
  2300.                   Ctrl-Left arrow     Move the cursor left one word.
  2301.                   Ctrl-Right arrow    Move the cursor right one word.
  2302.                   Home                Move the cursor to the beginning of
  2303.                                       the line.
  2304.                   End                 Move the cursor to the end of the
  2305.                                       line.
  2306.  
  2307.              Insert and Delete:
  2308.  
  2309.                   Ins                 Toggle between insert and overtype
  2310.                                       mode.
  2311.                   Del                 Delete the character at the cursor.
  2312.                   Backspace           Delete the character to the left of
  2313.                                       the cursor.
  2314.                   Ctrl-L              Delete the word or partial word to
  2315.                                       the left of the cursor.
  2316.                   Ctrl-R or Ctrl-Bksp Delete the word or partial word to
  2317.                                       the right of the cursor.
  2318.                   Ctrl-Home           Delete from the beginning of the line
  2319.                                       to the cursor.
  2320.                   Ctrl-End            Delete from the cursor to the end of
  2321.                                       the line.
  2322.                   Esc                 Delete the entire line.
  2323.                   Ctrl-C or Ctrl-Break     Cancel the command.
  2324.                   Enter               Execute the command line.
  2325.  
  2326.      4OS2 ## 4OS2 and 4DOS/NT will prompt for additional command-line text
  2327.      4NT     when you include the escape character as the very last
  2328.              character of a typed command line.  The default escape
  2329.              character in both programs is the caret [^].  For example,
  2330.  
  2331.                   [c:\] echo The quick brown fox jumped over the lazy^
  2332.  
  2333.         -------------------------------------------------------------------
  2334.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 34
  2335.  
  2336.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2337.         -------------------------------------------------------------------
  2338.  
  2339.                   More? sleeping dog. > alphabet
  2340.  
  2341.          ##  Sometimes you may want to enter one of the above keystrokes on
  2342.              the command line instead of performing the key's usual action.
  2343.              For example, suppose you have a program that requires a Ctrl-R
  2344.              character on its command line.  Normally you couldn't type
  2345.              this keystroke at the prompt, because it would be interpreted
  2346.              as a "Delete word right" command.
  2347.  
  2348.              To get around this problem, use the special keystroke Alt-255.
  2349.              You enter Alt-255 by holding down the Alt key while you type
  2350.              255 on the numeric keypad, then releasing the Alt key (you
  2351.              must use the number keys on the numeric pad; the row of keys
  2352.              at the top of your keyboard won't work).  This forces the
  2353.              command processor to interpret the next keystroke literally
  2354.              and places it on the command line, ignoring any special
  2355.              meaning it would normally have as a command-line editing or
  2356.              history keystroke.  You can use Alt-255 to suppress the normal
  2357.              meaning of command-line editing keystrokes even if they have
  2358.              been reassigned with key mapping directives in the .INI file
  2359.              (see page 120), and Alt-255 itself can be reassigned with the
  2360.              CommandEscape directive.
  2361.  
  2362.              If you want your input at the command line to be in a
  2363.              different color from the command processor's prompts or
  2364.              output, you can use the InputColors directive in your .INI
  2365.              file.  You must have an ANSI driver installed to use
  2366.              InputColors under 4DOS.  See page 135 for more details on
  2367.              InputColors.
  2368.  
  2369.              Most of the command-line editing capabilities are also
  2370.              available when a 4DOS, 4OS2, or 4DOS/NT command prompts you
  2371.              for a line of input.  For example, you can use the command-
  2372.              line editing keys when DESCRIBE (page 193) prompts for a file
  2373.              description, when INPUT (page 249) prompts for input from an
  2374.              alias or batch file, or when LIST (page 260) prompts you for a
  2375.              search string.
  2376.  
  2377.  
  2378.              Command History and Recall
  2379.  
  2380.              Each time you execute a command, the entire command line is
  2381.              saved in a command history list.  You can display the saved
  2382.              commands, search the list, modify commands, and rerun
  2383.              commands.
  2384.  
  2385.              The simplest use of the command history list is to repeat a
  2386.              command exactly.  For example, you might enter the command
  2387.  
  2388.  
  2389.         -------------------------------------------------------------------
  2390.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 35
  2391.  
  2392.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2393.         -------------------------------------------------------------------
  2394.  
  2395.                   c:\> dir b:*.wks;*.doc
  2396.  
  2397.              to see some of the files on drive B.  You might move some new
  2398.              files to drive B and then want to repeat the DIR command.
  2399.              Just press the Up Arrow key repeatedly to scan back through
  2400.              the history list.  When the DIR command appears, press Enter
  2401.              to execute it again.
  2402.  
  2403.              After you have found a command, you can edit it before
  2404.              pressing Enter.  You will appreciate this feature when you
  2405.              have to execute a series of commands that differ only slightly
  2406.              from each other.
  2407.  
  2408.              The history list is "circular".  If you move to the last
  2409.              command in the list and then press the down arrow one more
  2410.              time, you'll see the first command in the list.  Similarly, if
  2411.              you move to the first command in the list and then press the
  2412.              up arrow one more time, you'll see the last command in the
  2413.              list.
  2414.  
  2415.              You can search the command history list to find a previous
  2416.              command quickly using command completion.  Just enter the
  2417.              first few characters of the command you want to find and press
  2418.              Up Arrow.  You only need to enter enough characters to
  2419.              identify the command that you want to find.  For example, to
  2420.              find the DIR command, enter DI and then press Up Arrow.  If
  2421.              you press the Up Arrow key a second time, you will see the
  2422.              previous command that matches.  The system will beep if there
  2423.              are no matching commands.  The search process stops as soon as
  2424.              you type one of the editing keys, whether or not the line is
  2425.              changed.  At that point, the line you're viewing becomes the
  2426.              new line to match if you press Up Arrow again.
  2427.  
  2428.              You can specify the size of the command history list with the
  2429.              History directive in the .INI file (see page 127).  When the
  2430.              list is full, the oldest commands are discarded to make room
  2431.              for new ones.  You can also use the HistMin directive in the
  2432.              .INI file to enable or disable history saves and to specify
  2433.              the shortest command line that will be saved (see page 132).
  2434.  
  2435.              You can prevent any command line from being saved in the
  2436.              history by beginning it with an at sign [@].
  2437.  
  2438.              When you execute a command from the history, that command
  2439.              remains in the history list in its original position.  The
  2440.              command is not copied to the end of the list (unless you
  2441.              modify it).  If you want each command to be copied to the end
  2442.              of the list when it is re-executed, set HistCopy to Yes in
  2443.              your .INI file (see page 132).
  2444.  
  2445.         -------------------------------------------------------------------
  2446.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 36
  2447.  
  2448.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2449.         -------------------------------------------------------------------
  2450.  
  2451.              Command History Keys:
  2452.  
  2453.                   Up Arrow            Recall the previous (or most recent)
  2454.                                       command, or the most recent command
  2455.                                       that matches a partial command line.
  2456.                   Down Arrow          Recall the next (or oldest) command,
  2457.                                       or the oldest command that matches a
  2458.                                       partial command line.
  2459.                   F3                  Fill in the rest of the command line
  2460.                                       from the previous command, beginning
  2461.                                       at the current cursor position.
  2462.                   Ctrl-D              Delete the currently displayed
  2463.                                       history list entry, erase the command
  2464.                                       line, and display the previous
  2465.                                       matching history list entry.
  2466.                   Ctrl-E              Display the last entry in the history
  2467.                                       list.
  2468.                   Ctrl-K              Save the current command line in the
  2469.                                       history list without executing it,
  2470.                                       and then clear the command line
  2471.                   @                   As the first character in a line:  Do
  2472.                                       not save the current line in the
  2473.                                       history list when it is executed, or
  2474.                                       store it in the CMDLINE environment
  2475.                                       variable (see CMDLINE on page 96 for
  2476.                                       further details).
  2477.  
  2478.              Use F3 when your new command is different from your old one by
  2479.              just a character or two at the beginning.  For example,
  2480.              suppose you want to execute a DIR on several file names then
  2481.              use DEL to delete those same files.  After the DIR is complete
  2482.              type DEL and press F3; the rest of the command line will be
  2483.              completed for you.  Check that it's correct, and then press
  2484.              Enter to delete the files.  F3 also retrieves the entire
  2485.              previous command (like up-arrow) if nothing has been typed on
  2486.              the line.
  2487.  
  2488.              Use Ctrl-E to "get your bearings" by returning to the end of
  2489.              the list if you've scrolled around so much that you aren't
  2490.              sure where you are any more.
  2491.  
  2492.              Use Ctrl-K to save some work when you've typed a long command
  2493.              and then realize that you weren't quite ready.  For example,
  2494.              if you forget to change directories and notice it after a
  2495.              command is typed or mostly typed, but before you press Enter,
  2496.              just press Ctrl-K to save the command without executing it.
  2497.              Use the CD or CDD command to change to the right directory,
  2498.              press up-arrow twice to retrieve the command you saved, make
  2499.              any final changes to it, and press Enter to execute it.
  2500.  
  2501.         -------------------------------------------------------------------
  2502.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 37
  2503.  
  2504.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2505.         -------------------------------------------------------------------
  2506.  
  2507.              Local and Global Command History
  2508.  
  2509.              The command history can be stored in either a "local" or
  2510.              "global" list.
  2511.  
  2512.              With a local history list, any changes made to the history
  2513.              will only affect the current copy of the command processor.
  2514.              They will not be visible in other shells, or other sessions.
  2515.              A local history list is the default under 4DOS.
  2516.  
  2517.              With a global history list, all copies of the command
  2518.              processor will share the same command history, and any changes
  2519.              made to the history in one copy will affect all other copies.
  2520.              Global lists are the default for 4OS2 and 4DOS/NT.
  2521.  
  2522.              You can control the type of history list with the LocalHistory
  2523.              directive in the .INI file (see page 128), and with the /L and
  2524.              /LH options of the START command (see page 317).
  2525.  
  2526.              There is no fixed rule for deciding whether to use a local or
  2527.              global history list.  Depending on your work style, you may
  2528.              find it most convenient to use one type, or a mixture of types
  2529.              in different sessions or shells.  We recommend that you start
  2530.              with the default approach for your command processor, then
  2531.              modify it if you find a situation where the default is not
  2532.              convenient.
  2533.  
  2534.      4DOS    If you select a global history list for 4DOS running under
  2535.              DOS, you can share the history among all copies of 4DOS.
  2536.              However, if you run 4DOS under OS/2, global lists will apply
  2537.              within each DOS session, but will not allow you to share the
  2538.              history between different DOS sessions.
  2539.  
  2540.      4OS2 ## If you select a global history list for 4OS2 or 4DOS/NT, you
  2541.      4NT     can share the history among all copies of the command
  2542.              processor running in any session.  When you close all 4OS2 or
  2543.              4DOS/NT sessions, the memory for the global history list is
  2544.              released, and a new, empty history list is created the next
  2545.              time you start 4OS2 or 4DOS/NT.  If you want the history list
  2546.              to be retained in memory even when no command processor
  2547.              session is running, you need to load the SHRALIAS program,
  2548.              which performs this service for the global history and alias
  2549.              lists.  SHRALIAS is described in more detail under the ALIAS
  2550.              command (see page 164).
  2551.  
  2552.              Whenever you start a secondary shell (see page 12) which uses
  2553.              a local history list, it inherits a copy of the command
  2554.              history from the previous shell.  However, any changes to the
  2555.              history made in the secondary shell will affect only that
  2556.  
  2557.         -------------------------------------------------------------------
  2558.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 38
  2559.  
  2560.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2561.         -------------------------------------------------------------------
  2562.  
  2563.              shell.  If you want changes made in a secondary shell to
  2564.              affect the previous shell, use a global history list in both
  2565.              shells.
  2566.  
  2567.  
  2568.              Command History Window
  2569.  
  2570.              You can also view the command history in a scrollable command
  2571.              history window, and select the command to modify or re-execute
  2572.              from those displayed in the window.  To activate the command
  2573.              history window press PgUp or PgDn at the command line.  A
  2574.              window will appear in the upper right corner of the screen,
  2575.              with the command you most recently executed marked with a
  2576.              highlight.  (If you just finished re-executing a command from
  2577.              the history, then the next command in sequence will be
  2578.              highlighted.)
  2579.  
  2580.              You can scroll the command history window up and down one line
  2581.              at a time with Up Arrow and Down Arrow, and one page (screen)
  2582.              at a time with PgUp and PgDn.  The display is not circular as
  2583.              it is at the prompt; it has a fixed beginning and end.  Left
  2584.              Arrow and Right Arrow will pan the text in the history to the
  2585.              left or right.  Home or Ctrl-PgUp will go to the beginning of
  2586.              the history, and End or Ctrl-PgDn will go to the end.  The
  2587.              Ctrl-D (delete from history) key works within the history
  2588.              window as it does at the command line.
  2589.  
  2590.              Once you have selected a command in the history window, press
  2591.              Enter to execute it immediately, or Ctrl-Enter to move the
  2592.              line to the prompt for editing (you cannot edit the line
  2593.              directly in the history window).
  2594.  
  2595.              You can bring up a "filtered" history window by typing some
  2596.              characters on the command line, then pressing PgUp or PgDn.
  2597.              Only those commands matching the typed characters will be
  2598.              displayed in the window.
  2599.  
  2600.              You can control the position and size of the history window
  2601.              with directives in the .INI file (see page 133).  You can also
  2602.              change the keys used in the window with key mapping directives
  2603.              in the .INI file (see page 140).
  2604.  
  2605.              Command History Window:
  2606.  
  2607.                   PgUp or PgDn        (from the command line) Open the
  2608.                                       command history window.
  2609.                   Up Arrow            Scroll the display up one line.
  2610.                   Down Arrow          Scroll the display down one line.
  2611.                   Left Arrow          Scroll the display left 4 columns.
  2612.  
  2613.         -------------------------------------------------------------------
  2614.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 39
  2615.  
  2616.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2617.         -------------------------------------------------------------------
  2618.  
  2619.                   Right Arrow         Scroll the display right 4 columns.
  2620.                   PgUp                (inside the window) Scroll the
  2621.                                       display up one page.
  2622.                   PgDn                (inside the window) Scroll the
  2623.                                       display down one page.
  2624.                   Ctrl-PgUp or Home   Go to the beginning of the history
  2625.                                       list.
  2626.                   Ctrl-PgDn or End    Go to the end of the history list.
  2627.                   Ctrl-D              Delete the selected line from the
  2628.                                       history list.
  2629.                   Enter               Execute the selected line.
  2630.                   Ctrl-Enter          Move the selected line to the command
  2631.                                       line for editing.
  2632.  
  2633.  
  2634.              Filename Completion
  2635.  
  2636.              Filename completion can help you by filling in a complete file
  2637.              name on the command line when you only remember part of the
  2638.              name.  For example, suppose you want to copy a file.  You know
  2639.              that its name begins AU but you can't remember the rest of the
  2640.              name.  Type:
  2641.  
  2642.                   c:\> copy au
  2643.  
  2644.              and then press the Tab key or F9 key.  4DOS, 4OS2, or 4DOS/NT
  2645.              will search the current directory for filenames that begin AU
  2646.              and insert the first one onto the command line in place of the
  2647.              AU that you typed.
  2648.  
  2649.              If this is the file that you want, simply complete the
  2650.              command.  If the command processor didn't find the file that
  2651.              you were looking for, press Tab or F9 again to substitute the
  2652.              next filename that begins with AU.  When there are no more
  2653.              filenames that match your pattern, the system will beep each
  2654.              time you press Tab or F9.
  2655.  
  2656.              If you go past the filename that you want, press Shift-Tab or
  2657.              F8 to back up and return to the previous matching filename.
  2658.              After you back up to the first filename, the system will beep
  2659.              each time you press Shift-Tab or F8.
  2660.  
  2661.              If you want to enter more than one matching filename on the
  2662.              same command line, press F10 when each desired name appears.
  2663.              This will keep that name and place the next matching filename
  2664.              after it on the command line.  You can then use Tab (or F9)
  2665.              and Shift-Tab (or F8) to move through the remaining matching
  2666.              files.
  2667.  
  2668.  
  2669.         -------------------------------------------------------------------
  2670.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 40
  2671.  
  2672.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2673.         -------------------------------------------------------------------
  2674.  
  2675.              The pattern you use for matching may contain any valid
  2676.              filename characters, as well as wildcard characters and
  2677.              extended wildcards (see page 57).  For example, you can copy
  2678.              the first matching .TXT file by typing
  2679.  
  2680.                   c:\> copy *.txt
  2681.  
  2682.              and then pressing Tab.
  2683.  
  2684.              If you don't specify part of a filename before pressing Tab,
  2685.              the matching pattern will be *.*.  If you type a filename
  2686.              without an extension, the command processor will add *.* to
  2687.              the name.  It will also place a "*" after a partial extension.
  2688.              If you are typing a group of file names in an include list
  2689.              (see page 65), the part of the include list at the cursor will
  2690.              be used as the pattern to match.
  2691.  
  2692.              When filename completion is used at the start of the command
  2693.              line, it will only match directories, executable files (see
  2694.              page 20), and files with executable extensions, since these
  2695.              are the only file names that it makes sense to use at the
  2696.              start of a command.  If a directory is found, a "\" will be
  2697.              appended to it to enable an automatic directory change (see
  2698.              page 44).
  2699.  
  2700.              Filename Completion Keys:
  2701.  
  2702.                   F8 or Shift-Tab     Get the previous matching filename.
  2703.                   F9 or Tab           Get the next matching filename.
  2704.                   F10                 Keep the current matching filename
  2705.                                       and display the next matching name
  2706.                                       immediately after the current one.
  2707.  
  2708.  
  2709.              Filename Completion Window
  2710.  
  2711.              You can also view filenames in a scrollable filename
  2712.              completion window and select the file you want to work with.
  2713.              To activate the window, press F7 or Ctrl-Tab at the command
  2714.              line.  You will see a window in the upper-right corner of the
  2715.              screen, with the names of files that match any partial
  2716.              filename you have entered on the command line.  If you haven't
  2717.              yet entered a file name, the window will contain the name of
  2718.              all files in the current directory.  (Ctrl-Tab will work only
  2719.              if your keyboard and BIOS or keyboard driver support it.  If
  2720.              it does not work on your system, use F7 instead.)
  2721.  
  2722.              You can scroll the filename completion window up and down one
  2723.              line at a time with Up Arrow and Down Arrow, and one page
  2724.  
  2725.         -------------------------------------------------------------------
  2726.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 41
  2727.  
  2728.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2729.         -------------------------------------------------------------------
  2730.  
  2731.              (screen) at a time with PgUp and PgDn.  Home or Ctrl-PgUp will
  2732.              go to the beginning of the list of file names; End or Ctrl-
  2733.              PgDn will go to the end.  You can scroll the window left and
  2734.              right 4 spaces at a time with the Left Arrow or Right Arrow.
  2735.  
  2736.              Once you have selected the filename you want, press Enter to
  2737.              insert it into the command line.
  2738.  
  2739.              Filename Completion Window:
  2740.  
  2741.                   F7 or Ctrl-Tab      (from the command line)  Open the
  2742.                                       filename completion window.
  2743.                   Up Arrow            Scroll the display up one line.
  2744.                   Down Arrow          Scroll the display down one line.
  2745.                   Left Arrow          Scroll the display left 4 columns.
  2746.                   Right Arrow         Scroll the display right 4 columns.
  2747.                   PgUp                Scroll the display up one page.
  2748.                   PgDn                Scroll the display down one page.
  2749.                   Ctrl-PgUp or Home   Go to the beginning of the filename
  2750.                                       list.
  2751.                   Ctrl-PgDn or End    Go to the end of the filename list.
  2752.                   Enter               Insert the selected filename into the
  2753.                                       command line.
  2754.  
  2755.  
  2756.              Directory Changes and CDPATH
  2757.  
  2758.              The operating system and command processor remember both a
  2759.              current or default drive for your system as a whole, and a
  2760.              current or default directory for every drive in your system.
  2761.              The current directory on the current drive is sometimes called
  2762.              the current working directory.
  2763.  
  2764.              You can change the current drive by simply typing the new
  2765.              drive letter plus a colon at the prompt.  You can change the
  2766.              current working directory with the CD command (see page 175),
  2767.              the CDD command (page 177), the PUSHD and POPD commands (pages
  2768.              285 and 280), and with automatic directory changes (page 44).
  2769.              The CD command can change the default directory on any drive,
  2770.              but it cannot change the current working directory from one
  2771.              drive to another.  The other methods of changing the current
  2772.              working directory can change both the current drive and the
  2773.              current directory in a single command.
  2774.  
  2775.              Whenever you change the current working directory, 4DOS, 4OS2,
  2776.              or 4DOS/NT saves the original directory in up to three places.
  2777.              First, the directory is saved as the previous working
  2778.              directory.  You can change to the previous working directory
  2779.              with the CD - and CDD - commands (see pages 175 and 177).  You
  2780.  
  2781.         -------------------------------------------------------------------
  2782.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 42
  2783.  
  2784.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2785.         -------------------------------------------------------------------
  2786.  
  2787.              can use either of these commands repeatedly to switch back and
  2788.              forth between two directories.
  2789.  
  2790.              The original directory is also saved in the directory history
  2791.              (see the next topic below).  You can use this list to change
  2792.              to a recent directory with the cursor keys instead of typing a
  2793.              directory name.
  2794.  
  2795.              Finally, the PUSHD command records the old directory in the
  2796.              directory stack.  You can view the contents of this stack with
  2797.              the DIRS command and return to the directory on the top of the
  2798.              stack with the POPD command.
  2799.  
  2800.              If CD, CDD, PUSHD, or an automatic directory change can't
  2801.              locate the specified directory to change to, they will look
  2802.              for the CDPATH environment variable.  The command will append
  2803.              the specified directory name to each directory in CDPATH and
  2804.              attempt to change to that drive and directory, until the first
  2805.              match or the end of the CDPATH argument.  This allows you to
  2806.              use CDPATH as a quick way to find commonly used subdirectories
  2807.              which have unique names.  For example, if you are currently in
  2808.              the directory C:\WP\LETTERS\JANUARY and you'd like to change
  2809.              to D:\SOFTWARE\UTIL, you could enter the command:
  2810.  
  2811.                   c:\wp\letters\january> cdd d:\software\util
  2812.  
  2813.              However, if the D:\SOFTWARE directory is listed in your CDPATH
  2814.              variable, and is the first directory in the list with a UTIL
  2815.              subdirectory, you can simply enter the command
  2816.  
  2817.                   c:\wp\letters\january> cdd util
  2818.  
  2819.              to change to D:\SOFTWARE\UTIL.
  2820.  
  2821.              You can create CDPATH with the SET command.  The format of the
  2822.              CDPATH is similar to that of PATH:  a list of directories
  2823.              separated by semicolons [;].  For example, if you want the
  2824.              directory change commands to search the C:\DATA directory, the
  2825.              D:\SOFTWARE directory, and the root directory of drive E:\ for
  2826.              the subdirectories that you name, you should create CDPATH
  2827.              with this command:
  2828.  
  2829.                   c:\> set cdpath=c:\data;d:\software;e:\
  2830.  
  2831.  
  2832.              Directory History Window
  2833.  
  2834.              Every time you change to a new directory or drive, the current
  2835.              directory is recorded in an internal directory history.  The
  2836.  
  2837.         -------------------------------------------------------------------
  2838.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 43
  2839.  
  2840.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2841.         -------------------------------------------------------------------
  2842.  
  2843.              length of the directory history is fixed at 256 bytes; as new
  2844.              entries are added, old entries are deleted from the list.
  2845.              Directory changes are recorded whether you make them from the
  2846.              command line with the CD, CDD, PUSHD, or POPD commands, with
  2847.              an automatic directory change, or by typing a new drive letter
  2848.              followed by a colon.  Directories are recorded whether you
  2849.              change from one to another at the command line, from within a
  2850.              batch file, or from within an alias.  In order to conserve
  2851.              space, each directory name is recorded just once in the
  2852.              directory history, even if you move into and out of that
  2853.              directory several times.
  2854.  
  2855.              You can view the directory history from a scrollable directory
  2856.              history window and change to any drive and directory on the
  2857.              list.  To activate the directory history window, press Ctrl-
  2858.              PgUp or Ctrl-PgDn at the command line.  You can then select a
  2859.              new directory with the Enter key.
  2860.  
  2861.              Directory History Window:
  2862.  
  2863.                   Ctrl-PgUp           (from the command line) Open the
  2864.                     or Ctrl-PgDn      directory history window.
  2865.                   Up Arrow            Scroll the display up one line.
  2866.                   Down Arrow          Scroll the display down one line.
  2867.                   Left Arrow          Scroll the display left 4 columns.
  2868.                   Right Arrow         Scroll the display right 4 columns.
  2869.                   PgUp                Scroll the display up one page.
  2870.                   PgDn                Scroll the display down one page.
  2871.                   Ctrl-PgUp or Home   Go to the beginning of the directory
  2872.                                       list.
  2873.                   Ctrl-PgDn or End    Go to the end of the directory list.
  2874.                   Ctrl-D              Delete the selected line from the
  2875.                                       directory list.
  2876.                   Enter               Change to the selected drive and
  2877.                                       directory.
  2878.                   Ctrl-Enter          Move the selected line to the command
  2879.                                       line for editing.
  2880.  
  2881.  
  2882.              Automatic Directory Changes
  2883.  
  2884.              The automatic directory change feature gives you a quick
  2885.              method for changing directories.  You can use an automatic
  2886.              directory change in place of the CD or CDD command.  To do so,
  2887.              simply type the name of the directory you want to change to at
  2888.              the prompt, with a backslash [\] at the end.  For example:
  2889.  
  2890.                   c:\> 4dos\
  2891.                   c:\4dos>
  2892.  
  2893.         -------------------------------------------------------------------
  2894.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 44
  2895.  
  2896.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2897.         -------------------------------------------------------------------
  2898.  
  2899.              This feature can make directory changes very simple when it's
  2900.              combined with the CDPATH environment variable (see page 43).
  2901.              CDPATH is a list of directories for the CD and CDD commands to
  2902.              search if the directory you name does not exist below the
  2903.              current directory.  Automatic directory changes use CDPATH as
  2904.              well.  For example, suppose CDPATH is set to C:\;D:\;E:\, and
  2905.              the directory WIN exists on drive E:.  You can change to this
  2906.              directory with a single word on the command line:
  2907.  
  2908.                   c:\4dos> win\
  2909.                   e:\win>
  2910.  
  2911.              In executing the command shown above, the command processor
  2912.              first looks for a WIN subdirectory of the current directory,
  2913.              i.e., C:\4DOS\WIN.  If no such directory exists it looks for a
  2914.              WIN subdirectory in every directory in the CDPATH list, and
  2915.              changes to the first one it finds.
  2916.  
  2917.              Internally, automatic directory changes use the CDD command,
  2918.              so the text before the backslash can include a drive letter, a
  2919.              full path, or a partial path.  Commands like "....\" can be
  2920.              used to move up the directory tree quickly (see page 57).
  2921.              Automatic directory changes save the current directory, so it
  2922.              can be recalled with a "CDD -" or "CD -" command.  For more
  2923.              information on directory changes see page 43, CD on page 175,
  2924.              and CDD on page 177.
  2925.  
  2926.  
  2927.              Multiple Commands
  2928.  
  2929.              At times, you probably know the next two or three commands
  2930.              that you want to execute.  Instead of waiting for each one to
  2931.              finish before you type the next, you can type them all on the
  2932.              same command line, separated by a caret [^] in 4DOS, or an
  2933.              ampersand [&] in 4OS2 or 4DOS/NT.  For example, if you know
  2934.              you want to copy all of your .TXT files to drive A: and then
  2935.              run CHKDSK to be sure that drive A's file structure is in good
  2936.              shape, in 4DOS you could enter the following command:
  2937.  
  2938.                   c:\> copy *.txt a: ^ chkdsk a:
  2939.  
  2940.              You may put as many commands on the command line as you wish,
  2941.              as long as the total length of the command line does not
  2942.              exceed 255 characters in 4DOS or 1023 characters in 4OS2 and
  2943.              4DOS/NT.
  2944.  
  2945.              You can use multiple commands in batch files (see page 77) and
  2946.              alias definitions (see page 74) as well as from the command
  2947.              line.
  2948.  
  2949.         -------------------------------------------------------------------
  2950.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 45
  2951.  
  2952.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  2953.         -------------------------------------------------------------------
  2954.  
  2955.              If you don't like using the default command separator, you can
  2956.              pick another character using the SETDOS /C command (see page
  2957.              309) or the CommandSep directive in the .INI file (see page
  2958.              131).  If you plan to share aliases or batch files between
  2959.              4DOS, 4OS2, and 4DOS/NT, see page 72 for details about
  2960.              choosing compatible command separators for two or more
  2961.              products.
  2962.  
  2963.  
  2964.              Temporarily Disabling Aliases
  2965.  
  2966.              Aliases can be used to create shorthand names for commonly
  2967.              used commands, or to define default options for existing
  2968.              commands (for more information see pages 74 and 155).  At
  2969.              times, you may want to temporarily disable an alias that you
  2970.              have defined.  You may have an alias that changes the defaults
  2971.              of a particular command, for example, and want to run the
  2972.              unmodified version of the command.  To do so, precede the
  2973.              command name with an asterisk [*].  For example, if you have
  2974.              an alias for DIR which displays directories in 2-column paged
  2975.              mode by default, you can use the following command to display
  2976.              a directory in the normal single-column, non-paged mode:
  2977.  
  2978.                   c:\> *dir
  2979.  
  2980.              You can also disable aliases temporarily with the SETDOS /X
  2981.              command (see page 312).
  2982.  
  2983.  
  2984.              Command Line Help
  2985.  
  2986.              All of our products include complete online help.  You can
  2987.              start the help system by typing HELP or HELP plus a command
  2988.              name at the prompt, or by pressing the F1 key at any time at
  2989.              the command line.
  2990.  
  2991.      4DOS    In 4DOS,a special program (4HELP.EXE) displays the online
  2992.              help.  If you press F1, the 4DOS help system will display the
  2993.              list of all help topics just as if you had entered the HELP
  2994.              command.
  2995.  
  2996.      4OS2,   In 4OS2 and 4DOS/NT, the online help uses the operating
  2997.      4NT     system's built-in help facility.  If you press F1, the table
  2998.              of contents will be displayed and you can select the desired
  2999.              help topic using the standard help "navigation" keys for your
  3000.              system.
  3001.  
  3002.              If you have already typed part or all of a command on the
  3003.              line, the help system will provide "context-sensitive" help by
  3004.  
  3005.         -------------------------------------------------------------------
  3006.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 46
  3007.  
  3008.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3009.         -------------------------------------------------------------------
  3010.  
  3011.              using the first word on the line as a help topic.  If it's a
  3012.              valid topic, you will see help for that topic automatically;
  3013.              if not, you will see the list of all help topics (in 4DOS) or
  3014.              the table of contents (in 4OS2 and 4DOS/NT), and you can then
  3015.              pick the topic you want.  For example, if you press F1 after
  3016.              entering each of the command lines shown below you will get
  3017.              the display indicated:
  3018.  
  3019.                   c:\>                     Topic list / table of contents
  3020.                   c:\> copy *.* a:         Help on COPY
  3021.                   c:\> c:\util\map         Topic list / table of contents
  3022.  
  3023.              If you type the name of any internal command at the prompt,
  3024.              followed by a slash and a question mark [/?] like this:
  3025.  
  3026.                   copy /?
  3027.  
  3028.              then you will see help for the command in a "quick-reference"
  3029.              style.  Output from a /? display may be redirected with > or
  3030.              >> (see page 50).  The /? option may not work correctly if you
  3031.              have redefined how the command operates with an alias.  In
  3032.              this case you may need to add an asterisk to the beginning of
  3033.              the command to disable alias processing:
  3034.  
  3035.                   alias copy copy /r
  3036.                   *copy /?
  3037.  
  3038.              /? will only access the help system when you use it with an
  3039.              internal command.  If you use it with an external command
  3040.              name, the external command will be executed and will interpret
  3041.              the /? parameter according to its own rules.  Some external
  3042.              commands, including some DOS and OS/2 external utility
  3043.              programs, do display help when run with a /? parameter, but
  3044.              this a characteristic of these commands and does not depend on
  3045.              the command processor.  Many other external commands do not
  3046.              have this feature.
  3047.  
  3048.              Please see the Introduction and Installation Guide that was
  3049.              supplied with your version of 4DOS, 4OS2, or 4DOS/NT for a
  3050.              more thorough explanation of the online Help available with
  3051.              the program you use.
  3052.  
  3053.  
  3054.           ## Command-Line Length Limits
  3055.  
  3056.              Under 4DOS, when you first enter a command at the prompt or in
  3057.              an alias or batch file, it can be up to 255 characters long.
  3058.              The 4OS2 and 4DOS/NT command lines can hold 1,023 characters.
  3059.  
  3060.  
  3061.         -------------------------------------------------------------------
  3062.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 47
  3063.  
  3064.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3065.         -------------------------------------------------------------------
  3066.  
  3067.              As the command processor scans the command line and
  3068.              substitutes the contents of aliases and environment variables
  3069.              for their names, the line usually gets longer.  This expanded
  3070.              line is stored in an internal buffer which allows each
  3071.              individual command to grow to 255 characters during the
  3072.              expansion process (1,023 characters in 4OS2 and 4DOS/NT).  In
  3073.              addition, if you have multiple commands on a single line,
  3074.              during expansion the entire line can grow to as much as 511
  3075.              characters in 4DOS, or 2,047 characters in 4OS2 and 4DOS/NT.
  3076.              If your use of aliases or environment variables causes the
  3077.              command line to exceed either of these limits as it is
  3078.              expanded, you will see an error message and the remainder of
  3079.              the line will not be executed.
  3080.  
  3081.  
  3082.         Page and File Prompts
  3083.  
  3084.              Several 4DOS, 4OS2, and 4DOS/NT commands can generate prompts,
  3085.              which wait for you to press a key to view a new page or to
  3086.              perform a file activity.
  3087.  
  3088.              When 4DOS, 4OS2, or 4DOS/NT is displaying information in page
  3089.              mode, for example with a DIR /P or SET /P command, it displays
  3090.              the message
  3091.  
  3092.                   Press Esc to Quit or any other key to continue...
  3093.  
  3094.              At this prompt, you can press Esc, Ctrl-C, or Ctrl-Break if
  3095.              you want to quit the command.  You can press almost any other
  3096.              key to continue with the command and see the next page of
  3097.              information.
  3098.  
  3099.              During file processing, if you have activated prompting with a
  3100.              command like DEL /P, you will see this prompt before
  3101.              processing every file:
  3102.  
  3103.                   Y/N/R ?
  3104.  
  3105.              You can answer this prompt by pressing "Y" for "Yes, process
  3106.              this file;"  "N" for "No, do not process this file;"  or "R"
  3107.              for "process the Remainder of the files without further
  3108.              prompting."  You can also press Ctrl-C or Ctrl-Break at this
  3109.              prompt to cancel the remainder of the command.
  3110.  
  3111.              If you press Ctrl-C or Ctrl-Break while a batch file is
  3112.              running, you will see a "Cancel batch job" prompt.  For
  3113.              information on responses to this prompt see page 82.
  3114.  
  3115.  
  3116.  
  3117.         -------------------------------------------------------------------
  3118.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 48
  3119.  
  3120.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3121.         -------------------------------------------------------------------
  3122.  
  3123.         Critical Errors
  3124.  
  3125.              DOS, OS/2, and Windows NT all watch for physical errors during
  3126.              input and output operations.  Physical errors are those due to
  3127.              hardware problems, such as trying to read a floppy disk while
  3128.              the drive door is open.
  3129.  
  3130.              These errors are called critical errors because the operating
  3131.              system, command processor, or application program cannot
  3132.              proceed until the error is resolved.
  3133.  
  3134.              When a critical error occurs, you will see a message asking
  3135.              you to choose one of four error handling options.  The message
  3136.              comes from the command processor or the operating system, and
  3137.              will vary slightly depending on your operating system and
  3138.              (under OS/2 and Windows NT) whether you are in full-screen or
  3139.              windowed mode.  You can respond with a single character (under
  3140.              DOS), or a mouse click or menu selection (under OS/2 or
  3141.              Windows NT).  However, the options and their meanings are
  3142.              similar in all cases:
  3143.  
  3144.                   Retry  Retry the operation.  Choose this option if you
  3145.                          have corrected the problem.
  3146.  
  3147.                   Ignore Ignore the error and continue.  Use caution when
  3148.                          choosing this option.  Ignoring critical errors,
  3149.                          especially on the hard disk, can cause errors in
  3150.                          your applications or damage data on the disk.
  3151.  
  3152.                   Fail   Tell the program that the operation failed.  This
  3153.                          option returns an error code to the command
  3154.                          processor or to the application program that was
  3155.                          running when the error occurred.  4DOS, 4OS2, and
  3156.                          4DOS/NT generally stop the current command when
  3157.                          an operation fails.  This option is not available
  3158.                          for all errors; if you don't see it, use Abort
  3159.                          instead.  Under DOS, you can force a Fail
  3160.                          response to all critical errors with the CritFail
  3161.                          directive in 4DOS.INI (see page 142).
  3162.  
  3163.                   Abort  Abort the program.  Choose this option to stop
  3164.                          the program that was running when the error
  3165.                          occurred.  Choosing Abort after an error in 4DOS,
  3166.                          4DOS/NT, or the 16-bit version of 4OS2 will abort
  3167.                          the command, but not the command processor
  3168.                          itself.  Choosing Abort after an error in the 32-
  3169.                          bit version of 4OS2 will abort both the command
  3170.                          and the command processor.  To avoid this, use
  3171.                          Fail rather than Abort if possible.
  3172.  
  3173.         -------------------------------------------------------------------
  3174.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 49
  3175.  
  3176.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3177.         -------------------------------------------------------------------
  3178.  
  3179.         Input and Output
  3180.  
  3181.              Internal commands and many external programs get their input
  3182.              from the computer's standard input device and send their
  3183.              output to the standard output device.  Some programs also send
  3184.              special messages to the standard error device.  Normally, the
  3185.              keyboard is used for standard input and the video screen for
  3186.              both standard output and standard error, but you can
  3187.              temporarily change these assignments for special tasks.
  3188.  
  3189.              For example, suppose you want a printed list of the files in a
  3190.              directory.  If you change the standard output to the printer
  3191.              and issue a DIR command, the task is easy.  DIR prints to
  3192.              standard output, and you have redirected standard output to
  3193.              the printer, so the DIR command prints filenames instead of
  3194.              displaying them on the screen.  You can just as easily send
  3195.              the output of DIR (or any other command) to a file or a serial
  3196.              port.
  3197.  
  3198.              We offer three methods of manipulating input and output:
  3199.              Redirection, Piping, and (under 4DOS) the Keystack.  All three
  3200.              are explained in this section.
  3201.  
  3202.              Redirection and piping affect the standard input, standard
  3203.              output, and standard error devices.  They do not work with
  3204.              application programs which read the keyboard hardware
  3205.              directly, or which write directly to the screen.
  3206.  
  3207.  
  3208.              Redirection
  3209.  
  3210.              Redirection assigns standard input, standard output, and
  3211.              standard error to a device like the printer or serial port, or
  3212.              to a file.  (You must use some discretion when you use
  3213.              redirection with a device; there is no way to get input from
  3214.              the printer, for example.)
  3215.  
  3216.              Redirection always applies to a specific command, and lasts
  3217.              only for the duration of that command.  When the command is
  3218.              finished, the assignments for standard input, standard output,
  3219.              and standard error revert to whatever they were before the
  3220.              command.
  3221.  
  3222.              In the descriptions below, filename means either the name of a
  3223.              file or of an appropriate device (PRN, LPT1, LPT2, or LPT3 for
  3224.              printers; COM1 to COM4 for serial ports; CON for the keyboard
  3225.              and screen; etc.).
  3226.  
  3227.  
  3228.  
  3229.         -------------------------------------------------------------------
  3230.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 50
  3231.  
  3232.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3233.         -------------------------------------------------------------------
  3234.  
  3235.              To use redirection, place the redirection symbol and filename
  3236.              at the end of the command line, after the command name and any
  3237.              parameters.  For example, to redirect the output of the DIR
  3238.              command to a file called DIRLIST, you could use a command line
  3239.              like this:
  3240.  
  3241.                   c:\> dir /b *.dat > dirlist
  3242.  
  3243.              You can use both input and output redirection for the same
  3244.              command, if both are appropriate:
  3245.  
  3246.                   c:\> sort < dirlist > dirlist.srt
  3247.  
  3248.              If you redirect the output of a single internal command like
  3249.              DIR, the redirection ends automatically when that command is
  3250.              done.  If you start a batch file with redirection, all of the
  3251.              batch file's output is redirected, and redirection ends when
  3252.              the batch file is done.  Similarly, if you use redirection at
  3253.              the end of a command group (see page 69), all of the output
  3254.              from the command group is redirected, and redirection ends
  3255.              when the command group is done.
  3256.  
  3257.              Here are the redirection options supported by 4DOS, 4OS2, and
  3258.              4DOS/NT:
  3259.  
  3260.                   To get input from a file or device instead of from the
  3261.                   keyboard:
  3262.  
  3263.                        < filename
  3264.  
  3265.                   To redirect standard output to a file or device:
  3266.  
  3267.                        > filename
  3268.  
  3269.                   To redirect standard output and standard error to a file
  3270.                   or device:
  3271.  
  3272.                        >& filename
  3273.  
  3274.                   To redirect standard error only to a file or device:
  3275.  
  3276.                        >&> filename
  3277.  
  3278.              If you want to append output to the end of an existing file,
  3279.              rather than creating a new file, replace the first ">" in the
  3280.              last three commands above with ">>" (use >>, >>&, and >>&>).
  3281.  
  3282.          ##  When output is directed to a file with >, >&, or >&>, if the
  3283.              file already exists, it will be overwritten.  You can protect
  3284.  
  3285.         -------------------------------------------------------------------
  3286.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 51
  3287.  
  3288.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3289.         -------------------------------------------------------------------
  3290.  
  3291.              existing files by using the SETDOS /N1 command (see page 311)
  3292.              or the NoClobber directive in the .INI file (see page 134).
  3293.  
  3294.          ##  When output is appended to a file with >>, >>&, or >>&>, the
  3295.              file will be created if it doesn't already exist.  Setting
  3296.              NoClobber will also prevent the creation of a new file.
  3297.  
  3298.          ##  You can temporarily override the current setting of NoClobber
  3299.              by using an exclamation mark [!] after the redirection symbol.
  3300.              For example, to redirect the output of DIR to the file DIROUT,
  3301.              and allow overwriting of any existing file despite the
  3302.              NoClobber setting:
  3303.  
  3304.                   c:\> dir >! dirout
  3305.  
  3306.          ##  Redirection is fully nestable.  For example, you can invoke a
  3307.              batch file and redirect all of its output to a file or device.
  3308.              Output redirection on a command within the batch file will
  3309.              take effect for that command only; when the command is
  3310.              completed, output will revert to the redirected output file or
  3311.              device in use for the batch file as a whole.
  3312.  
  3313.          ##  You can use redirection if you need to create a zero-byte
  3314.              file.  To do so, enter  >filename as a command, with no actual
  3315.              command before the > character.
  3316.  
  3317.      4DOS ## For another method of changing the standard input and output
  3318.              devices see CTTY on page 187.
  3319.  
  3320.      4OS2,   In addition to the extended 4DOS redirection options, 4OS2 and
  3321.      4NT     4DOS/NT also support the OS/2 and Windows NT CMD.EXE syntax
  3322.  
  3323.                        n>file
  3324.  
  3325.              and
  3326.  
  3327.                        n>&m
  3328.  
  3329.              where [n] and [m] are digits between 0 and 9.  You may not put
  3330.              any spaces between the n and the >, or between the >, &, and m
  3331.              in the second form.   The digits represent file handles; OS/2
  3332.              and Windows NT interpret "0" as standard input, "1" as
  3333.              standard output, and "2" as standard error.  Handles 3 to 9
  3334.              will probably not be useful unless you have an application
  3335.              which uses those handles for a specific, documented purpose,
  3336.              or have opened a file with the %@FILEOPEN variable function
  3337.              (see page 110) and the file handle is between 3 and 9.
  3338.  
  3339.  
  3340.  
  3341.         -------------------------------------------------------------------
  3342.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 52
  3343.  
  3344.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3345.         -------------------------------------------------------------------
  3346.  
  3347.              The n>file syntax redirects output from handle n to a file.
  3348.              You can use this form to redirect two handles to different
  3349.              places.  For example:
  3350.  
  3351.                   [c:\] dir > outfile 2> errfile
  3352.  
  3353.              sends normal output to a file called OUTFILE and any error
  3354.              messages to a file called ERRFILE.
  3355.  
  3356.              The n>&m syntax redirects handle n to the same location as the
  3357.              previously assigned handle m.  For example, to send standard
  3358.              error to the same file as standard output, you could use this
  3359.              command:
  3360.  
  3361.                   [c:\] dir > outfile 2>&1
  3362.  
  3363.              Notice that you can perform the same operations by using 4OS2
  3364.              or 4DOS/NT's enhanced redirection features.  The two examples
  3365.              above could be written as
  3366.  
  3367.                   [c:\] dir > outfile >&> errfile
  3368.  
  3369.              and
  3370.  
  3371.                   [c:\] dir >&outfile
  3372.  
  3373.  
  3374.              Piping
  3375.  
  3376.              You can also create a "pipe," which means sending the standard
  3377.              output of one command to the standard input of another
  3378.              command.  To send the standard output of command1 to the
  3379.              standard input of command2:
  3380.  
  3381.                   command1 | command2
  3382.  
  3383.              To send the standard output and standard error of command1 to
  3384.              the standard input of command2:
  3385.  
  3386.                   command1 |& command2
  3387.  
  3388.              For example, to take the output of the SET command (which
  3389.              displays a list of your environment variables and their
  3390.              values) and pipe it to the SORT utility to generate a sorted
  3391.              list, you would use the command:
  3392.  
  3393.                   c:\> set | sort
  3394.  
  3395.  
  3396.  
  3397.         -------------------------------------------------------------------
  3398.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 53
  3399.  
  3400.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3401.         -------------------------------------------------------------------
  3402.  
  3403.              To do the same thing and then pipe the sorted list to the
  3404.              internal LIST command for full-screen viewing (see page 260):
  3405.  
  3406.                   c:\> set | sort | list /s
  3407.  
  3408.          ##  The TEE and Y commands (see pages 326 and 344) are "pipe
  3409.              fittings" which add more flexibility to pipes.
  3410.  
  3411.          ##  Like redirection, pipes are fully nestable.  For example, you
  3412.              can invoke a batch file and send all of its output to another
  3413.              command with a pipe.  A pipe on a command within the batch
  3414.              file will take effect for that command only; when the command
  3415.              is completed, output will revert to the pipe in use for the
  3416.              batch file as a whole.  You may also have 2 or more pipes
  3417.              operating simultaneously if, for example, you have the pipes
  3418.              running in different windows in a multitasking system.
  3419.  
  3420.      4DOS ## 4DOS creates one or two temporary files to hold the output of
  3421.              pipes.  The files are given unique names.  By default, these
  3422.              files are stored in the root directory of the boot drive, but
  3423.              you can override this with either the TEMP4DOS or TEMP
  3424.              environment variable (see page 97).
  3425.  
  3426.      4OS2 ## 4OS2 and 4DOS/NT implement pipes by starting a new process for
  3427.      4NT     the receiving program instead of using temporary files.  The
  3428.              sending and receiving programs run simultaneously; the sending
  3429.              program writes to the pipe and the receiving program reads
  3430.              from the pipe.  When the receiving program finishes reading
  3431.              and processing the piped data, it is ended automatically.
  3432.  
  3433.              If you are used to using pipes under 4DOS, you normally will
  3434.              not see any difference with a 4OS2 or 4DOS/NT pipe except
  3435.              perhaps less disk activity.  But you may not get the results
  3436.              you expect if you use a pipe command like:
  3437.  
  3438.                        [c:\] echo test | input %%var
  3439.  
  3440.      4DOS    In 4DOS, this pipe will create an environment variable called
  3441.              VAR and set its value as "test."  You will be able to see the
  3442.              new variable by typing SET at the prompt.
  3443.  
  3444.      4OS2,   In 4OS2 and 4DOS/NT, VAR will be set in the environment that
  3445.      4NT     belongs to the receiving program.  But that environment will
  3446.              be discarded when the pipe has been emptied and the process
  3447.              ends.  You will never see VAR in the environment even though
  3448.              the command processor and the operating system are both
  3449.              operating correctly.
  3450.  
  3451.  
  3452.  
  3453.         -------------------------------------------------------------------
  3454.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 54
  3455.  
  3456.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3457.         -------------------------------------------------------------------
  3458.  
  3459.              The same cautions apply to the "pipe-fitting" commands, TEE
  3460.              and Y.  When you use pipes with 4OS2 or 4DOS/NT, make sure you
  3461.              think about any possible consequences that can occur from
  3462.              using a separate process to run the receiving program.
  3463.  
  3464.  
  3465.      4DOS    Keystack
  3466.  
  3467.              The 4DOS Keystack overcomes two weaknesses of input
  3468.              redirection:  many programs ignore standard input and read the
  3469.              keyboard directly, and input redirection doesn't end until the
  3470.              program or command terminates.  You can't, for example, use
  3471.              redirection to send the opening commands to a program and then
  3472.              type the rest of the commands yourself.  But the Keystack lets
  3473.              you do exactly that.
  3474.  
  3475.              The 4DOS Keystack sends keystrokes to an application program.
  3476.              Once the Keystack is empty, the program will receive the rest
  3477.              of its input from the keyboard.  The Keystack is useful when
  3478.              you want a program to take certain actions automatically when
  3479.              it starts.  It is most often used in batch files and aliases.
  3480.  
  3481.              The Keystack is invoked with the KEYSTACK command (see page
  3482.              254).  It depends on a small resident program called
  3483.              KSTACK.COM, which may be installed from your AUTOEXEC.BAT file
  3484.              (see page 83).  If you don't have KSTACK.COM installed, the
  3485.              KEYSTACK command will display an error message.  If you are
  3486.              using a multitasking system such as DESQview or Windows, see
  3487.              your 4DOS Introduction and Installation Guide for information
  3488.              on loading KSTACK within a window.
  3489.  
  3490.              To place the letters, digits, and punctuation marks you would
  3491.              normally type for your program into the keystack, enclose them
  3492.              in double quotes:
  3493.  
  3494.                   c:\> keystack "myfile"
  3495.  
  3496.              Many other keys can be entered into the Keystack using their
  3497.              names.  This example puts the F1 key followed by the Enter key
  3498.              in the keystack:
  3499.  
  3500.                   c:\> keystack F1 Enter
  3501.  
  3502.              See page 31 for details on how key names are entered.  See the
  3503.              KEYSTACK command on page 254 for information on using numeric
  3504.              key values along with or instead of key names, and other
  3505.              details about using the Keystack.
  3506.  
  3507.  
  3508.  
  3509.         -------------------------------------------------------------------
  3510.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 55
  3511.  
  3512.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3513.         -------------------------------------------------------------------
  3514.  
  3515.              The following command creates an alias (see page 155) that
  3516.              will run a dBASE report called TIMEREP (it should be entered
  3517.              on one line):
  3518.  
  3519.                   c:\> alias drpt `keystack "use times index times" Enter
  3520.                        "report form timerep to print" Enter "quit" Enter
  3521.                         ^ dbase`
  3522.  
  3523.              This command creates an alias called DRPT which puts the
  3524.              following characters on the keystack:
  3525.  
  3526.                   the characters "use times index times"
  3527.                   the Enter key's code
  3528.                   the characters "report form timerep to print"
  3529.                   the Enter key's code
  3530.                   the characters "quit"
  3531.                   and one more Enter key
  3532.  
  3533.              The alias then runs the program dBASE which receives those
  3534.              characters just as if you had typed them.
  3535.  
  3536.              When you use the Keystack, remember that you must put the
  3537.              keystrokes into the Keystack before you run the program that
  3538.              will receive them.  The Keystack will hold the keystrokes
  3539.              until the program asks for them.
  3540.  
  3541.  
  3542.         File Selection
  3543.  
  3544.              Most internal commands (like COPY, DIR, etc.) work on a file
  3545.              or a group of files.  Besides typing the exact name of the
  3546.              file you want to work with, you can use several shorthand
  3547.              forms for naming or selecting files:  Extended Parent
  3548.              Directory Names; Wildcards; Date, Time, and Size Ranges;
  3549.              Multiple Filenames; Include Lists; and Executable Extensions.
  3550.              These six features are explained in this section.
  3551.  
  3552.              These features apply to 4DOS, 4OS2, and 4DOS/NT commands only,
  3553.              and generally can not be used to pass file names to external
  3554.              programs.  For example, the file name ...\FILE.DAT uses an
  3555.              extended parent directory name ("...").  It can be used in an
  3556.              internal command like COPY or MOVE.  However, your editor
  3557.              probably was not designed to support this extension to
  3558.              traditional directory names, and is likely to give an error
  3559.              message if you try to pass it such a name.
  3560.  
  3561.              Remember throughout this section that, if you are using DOS,
  3562.              or the FAT file system under OS/2 or Windows NT, a filename is
  3563.              a base name of 1 to 8 characters, optionally followed by an
  3564.  
  3565.         -------------------------------------------------------------------
  3566.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 56
  3567.  
  3568.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3569.         -------------------------------------------------------------------
  3570.  
  3571.              extension which is a period [.] and 1 to 3 more characters.
  3572.              On an HPFS or NTFS drive, file names can contain up to 255
  3573.              characters, including spaces.  If an HPFS or NTFS filename
  3574.              includes spaces, you must place it in quotation marks on the
  3575.              command line.  (See page  13 for additional details on
  3576.              filename formats and restrictions.)
  3577.  
  3578.  
  3579.              Extended Parent Directory Names
  3580.  
  3581.              4DOS, 4OS2, and 4DOS/NT allow you to extend the traditional
  3582.              DOS ".." syntax for naming the parent directory, by adding
  3583.              additional [.] characters.  Each additional [.] represents an
  3584.              additional directory level above the current directory.  For
  3585.              example, .\FILE.DAT refers to a file in the current directory,
  3586.              ..\FILE.DAT refers to a file one level up (in the parent
  3587.              directory), and ...\FILE.DAT refers to a file two levels up
  3588.              (in the parent of the parent directory).  If you are in the
  3589.              C:\DATA\FINANCE\JANUARY directory and want to copy the file
  3590.              LETTERS.DAT from the directory C:\DATA to drive A:
  3591.  
  3592.                   C:\DATA\FINANCE\JANUARY>copy ...\LETTERS.DAT A:
  3593.  
  3594.  
  3595.              Wildcards
  3596.  
  3597.              Wildcards let you specify a file or group of files by typing a
  3598.              partial filename.  The appropriate directory is scanned to
  3599.              find all of the files that match the partial name you have
  3600.              specified.
  3601.  
  3602.              Most internal commands accept filenames with wildcards
  3603.              anywhere that a full filename can be used.  There are two
  3604.              wildcard characters, the asterisk [*] and the question mark
  3605.              [?], plus a special method of specifying a range of
  3606.              permissible characters.
  3607.  
  3608.              An asterisk [*] in a filename means "any zero or more
  3609.              characters in this position."  For example, this command will
  3610.              display a list of all files in the current directory:
  3611.  
  3612.                   c:\> dir *.*
  3613.  
  3614.              If you want to see all of the files with a .TXT extension, you
  3615.              could type this:
  3616.  
  3617.                   c:\> dir *.txt
  3618.  
  3619.  
  3620.  
  3621.         -------------------------------------------------------------------
  3622.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 57
  3623.  
  3624.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3625.         -------------------------------------------------------------------
  3626.  
  3627.              If you know that the file you are looking for has a base name
  3628.              that begins with ST and an extension that begins with .D, you
  3629.              can find it this way.  Filenames such as STATE.DAT,
  3630.              STEVEN.DOC, and ST.D will all be displayed:
  3631.  
  3632.                   c:\> dir st*.d*
  3633.  
  3634.              With 4DOS, 4OS2, or 4DOS/NT, you can also use the asterisk to
  3635.              match filenames with specific letters somewhere inside the
  3636.              name.  The following example will display any file with a .TXT
  3637.              extension that has the letters AM together anywhere inside its
  3638.              base name.  It will, for example, display AMPLE.TXT,
  3639.              STAMP.TXT, CLAM.TXT, and AM.TXT:
  3640.  
  3641.                   c:\> dir *am*.txt
  3642.  
  3643.              A question mark [?] matches any single filename character.
  3644.              You can put the question mark anywhere in a filename and use
  3645.              as many question marks as you need.  The following example
  3646.              will display files with names like LETTER.DOC and LATTER.DAT,
  3647.              and LITTER.DU:
  3648.  
  3649.                   c:\> dir l?tter.d??
  3650.  
  3651.              The use of an asterisk wildcard before other characters, and
  3652.              of the character ranges discussed below, are enhancements to
  3653.              the standard wildcard syntax, and are not likely to work
  3654.              properly with software other than 4DOS, 4OS2, and 4DOS/NT.
  3655.  
  3656.          ##  "Extra" question marks in your wildcard specification are
  3657.              ignored if the file name is shorter than the wildcard
  3658.              specification.  For example, if you have files called
  3659.              LETTER.DOC, LETTER1.DOC, and LETTERA.DOC, this command will
  3660.              display all three names:
  3661.  
  3662.                   c:\> dir letter?.doc
  3663.  
  3664.              The file LETTER.DOC is included in the display because the
  3665.              "extra" question mark at the end of "LETTER?" is ignored when
  3666.              matching the shorter name LETTER.
  3667.  
  3668.          ##  In some cases, the question mark wildcard may be too general.
  3669.              You can also specify what characters you want to accept (or
  3670.              exclude) in a particular position in the filename by using
  3671.              square brackets.  Inside the brackets, you can put the
  3672.              individual acceptable characters or ranges of characters.  For
  3673.              example, if you wanted to match LETTER0.DOC through
  3674.              LETTER9.DOC, you could use this command:
  3675.  
  3676.  
  3677.         -------------------------------------------------------------------
  3678.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 58
  3679.  
  3680.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3681.         -------------------------------------------------------------------
  3682.  
  3683.                   c:\> dir letter[0-9].doc
  3684.  
  3685.              You could find all files that have a vowel as the second
  3686.              letter in their name this way.  This example also demonstrates
  3687.              how to mix the wildcard characters:
  3688.  
  3689.                   c:\> dir ?[aeiouy]*.*
  3690.  
  3691.              You can exclude a group of characters or a range of characters
  3692.              by using an exclamation mark [!] as the first character inside
  3693.              the brackets.  This example displays all filenames that are at
  3694.              least 2 characters long except those which have a vowel as the
  3695.              second letter in their names:
  3696.  
  3697.                   c:\> dir ?[!aeiouy]*.*
  3698.  
  3699.              The next example, which selects files such as AIP, BIP, and
  3700.              TIP but not NIP, demonstrates how you can use multiple ranges
  3701.              inside the brackets.  It will accept a file that begins with
  3702.              an A, B, C, D, T, U, or V:
  3703.  
  3704.                   c:\> dir [a-dt-v]ip
  3705.  
  3706.          ##  You may use a question mark character inside the brackets, but
  3707.              its meaning is slightly different than a normal (unbracketed)
  3708.              question mark wildcard.  A normal question mark wildcard
  3709.              matches any character, but will be ignored when matching a
  3710.              name shorter than the wildcard specification, as described
  3711.              above.  A question mark inside brackets will match any
  3712.              character, but will not be discarded when matching shorter
  3713.              filenames.  For example:
  3714.  
  3715.                   c:\> dir letter[?].doc
  3716.  
  3717.              will display LETTER1.DOC and LETTERA.DOC, but not LETTER.DOC.
  3718.  
  3719.          ##  You can repeat any of the wildcard characters in any
  3720.              combination you desire within a single file name.  For
  3721.              example, the following command lists all files which have an
  3722.              A, B, or C as the third character, followed by zero or more
  3723.              additional characters, followed by a D, E, or F, followed
  3724.              optionally by some additional characters, and with an
  3725.              extension beginning with P or Q.  You probably won't need to
  3726.              do anything this complex, but we've included it to show you
  3727.              the flexibility of extended wildcards:
  3728.  
  3729.                   c:\> dir ??[abc]*[def]*.[pq]*
  3730.  
  3731.  
  3732.  
  3733.         -------------------------------------------------------------------
  3734.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 59
  3735.  
  3736.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3737.         -------------------------------------------------------------------
  3738.  
  3739.      4OS2 ## You can also use the square bracket wildcard syntax to work
  3740.      4NT     around a conflict between HPFS and NTFS filenames containing
  3741.              semicolons [;], and the use of a semicolon to indicate an
  3742.              include list (see page 65).  For example, if you have a file
  3743.              on an HPFS drive named C:\DATA\LETTER1;V2 and you enter this
  3744.              command:
  3745.  
  3746.                   [c:\] del \data\letter1;v2
  3747.  
  3748.              you will not get the results you expect.  Instead of deleting
  3749.              the named file, 4OS2 or 4DOS/NT will attempt to delete LETTER1
  3750.              and then V2, because the semicolon indicates an include list.
  3751.              However if you use square brackets around the semicolon it
  3752.              will be interpreted as a filename character, and not as an
  3753.              include list separator.  For example, this command would
  3754.              delete C:\DATA\LETTER1;V2:
  3755.  
  3756.                   [c:\] del \data\letter1[;]v2
  3757.  
  3758.  
  3759.              Date, Time, and Size Ranges
  3760.  
  3761.              Most internal commands which accept wild cards also allow
  3762.              date, time, and size ranges to further define the files that
  3763.              you wish to work with.  4DOS, 4OS2, and 4DOS/NT will examine
  3764.              the files' timestamps (which record when the file was last
  3765.              modified), and the files' sizes, to determine which files meet
  3766.              the range criteria that you specify.
  3767.  
  3768.              A range begins with the switch character (usually a slash
  3769.              [/]), followed by a left square bracket ("[") and a character
  3770.              that specifies the range type:  "s" for a size range, "d" for
  3771.              a date range, or "t" for a time range.  The "s", "d", or "t"
  3772.              is followed by a start value, and an optional comma and end
  3773.              value.  The range ends with a right square bracket ("]").
  3774.  
  3775.      4DOS !  Ranges should not be used with the DEL /Q command under DOS.
  3776.              See the notes under DEL on page 189 for additional details.
  3777.  
  3778.  
  3779.              Size Ranges
  3780.  
  3781.              Size ranges simply select files whose size is between the
  3782.              limits given.  For example, /[s10000,20000] selects files
  3783.              between 10,000 and 20,000 bytes long.
  3784.  
  3785.              Either or both values in a size range can end with "k" to
  3786.              indicate thousands of bytes, "K" to indicate kilobytes (1,024
  3787.              bytes), "m" to indicate millions of bytes, or "M" to indicate
  3788.  
  3789.         -------------------------------------------------------------------
  3790.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 60
  3791.  
  3792.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3793.         -------------------------------------------------------------------
  3794.  
  3795.              megabytes (1,048,576 bytes).  For example, the range above
  3796.              could be rewritten as /[s10k,20k].
  3797.  
  3798.              All ranges are inclusive.  Both examples above will match
  3799.              files that are exactly 10,000 bytes and 20,000 bytes long, as
  3800.              well as all sizes in between.
  3801.  
  3802.              The second argument of a size range is optional.  If you use a
  3803.              single argument, like /[s10k], you will select files of that
  3804.              size or larger.  You can also precede the second argument with
  3805.              a plus sign [+]; when you do, it is added to the first value
  3806.              to determine the largest file size to include in the search.
  3807.              For example,  /[s10k,+1k] select files from 10,000 through
  3808.              11,000 bytes in size.
  3809.  
  3810.              Some further examples of size ranges:
  3811.  
  3812.                   Specification       Selects Files
  3813.  
  3814.                   /[s0,0]             of length zero (empty)
  3815.                   /[s1M]              1 megabyte or more in length
  3816.                   /[s10k,+200]        between 10,000 and 10,200 bytes
  3817.  
  3818.  
  3819.              Date Ranges
  3820.  
  3821.              Date ranges select files that were created or last modified at
  3822.              any time between the two dates.  For example,
  3823.              /[d12-1-93,12-5-93] selects files that were last modified
  3824.              between December 1, 1993, and December 5, 1993.
  3825.  
  3826.              The time for the starting date defaults to 00:00:00 and the
  3827.              time for the ending date defaults to 23:59:59.  You can alter
  3828.              these defaults, if you wish, by including a start and stop
  3829.              time inside the date range.  The time is separated from the
  3830.              date with an at sign [@].  For example, the range
  3831.              /[d7-1-94@8:00a,7-3-94@6:00p] selects files that were modified
  3832.              at any time between 8:00 am on July 1, 1994 and 6:00 pm on
  3833.              July 3, 1994.  If you prefer, you can specify the times in 24-
  3834.              hour format (e.g., @18:00 for the end time in the previous
  3835.              example).
  3836.  
  3837.              If you omit the second argument in a date range, the command
  3838.              processor substitutes the current date and time.  For example,
  3839.              /[d10-1-93] selects files dated between October 1, 1993 and
  3840.              today.
  3841.  
  3842.              You can use an offset value for either the beginning or ending
  3843.              date, or both.  An offset begins with a plus sign [+] or a
  3844.  
  3845.         -------------------------------------------------------------------
  3846.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 61
  3847.  
  3848.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3849.         -------------------------------------------------------------------
  3850.  
  3851.              minus sign [-] followed by an integer.  If you use an offset
  3852.              for the second value, it is calculated relative to the first.
  3853.              If you use an offset for the first (or only) value, the
  3854.              current date is used as the basis for calculation.  For
  3855.              example:
  3856.  
  3857.                   Specification       Selects Files
  3858.  
  3859.                   /[d10-27-93,+3]     modified between 10-27-93 and
  3860.                                       10-30-93
  3861.  
  3862.                   /[d10-27-93,-3]     modified between 10-24-93 and
  3863.                                       10-27-93
  3864.  
  3865.                   /[d-0]              modified today (from today minus zero
  3866.                                       days, to today)
  3867.  
  3868.                   /[d-1]              modified yesterday or today (from
  3869.                                       today minus one day, to today)
  3870.  
  3871.                   /[d-1,+0]           modified yesterday (from today minus
  3872.                                       one day, to zero days after that)
  3873.  
  3874.              You cannot use offsets in the time portion of a date range
  3875.              (the part after an at sign), but you can combine a time with a
  3876.              date offset.  For example, /[d12-8-93@12:00,+2@12:00] selects
  3877.              files that were last modified between noon on December 8 and
  3878.              noon on December 10, 1993.  Similarly, /[d-2@15:00,+1] selects
  3879.              files last modified between 3:00 pm the day before yesterday
  3880.              and the end of the day one day after that, i.e., yesterday.
  3881.              The second time defaults to the end of the day because no time
  3882.              is given.
  3883.  
  3884.  
  3885.              Time Ranges
  3886.  
  3887.              A time range specifies a file modification time without
  3888.              reference to the date.  For example, to select files modified
  3889.              between noon and 2:00 pm on any date, use /[t12:00p,2:00p].
  3890.              The times in a time range can either be in 12-hour format,
  3891.              with a trailing "a" for AM or "p" for PM, or in 24-hour
  3892.              format.
  3893.  
  3894.              If you omit the second argument in a time range, you will
  3895.              select files that were modified between the first time and the
  3896.              current time, on any date.  You can also use offsets,
  3897.              beginning with a plus sign [+] or a minus sign [-] for either
  3898.              or both of the arguments in a time range.  The offset values
  3899.              are interpreted as minutes.  Some examples:
  3900.  
  3901.         -------------------------------------------------------------------
  3902.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 62
  3903.  
  3904.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3905.         -------------------------------------------------------------------
  3906.  
  3907.                   Specification       Selects Files
  3908.  
  3909.                   /[t12:00p,+120]     modified between noon and 2:00 PM on
  3910.                                       any date
  3911.                   /[t-120,+120]       modified between two hours ago and
  3912.                                       the current time on any date
  3913.                   /[t0:00,11:59]      modified in the morning on any date
  3914.  
  3915.  
  3916.              Using Ranges
  3917.  
  3918.              If you combine two types of ranges, a file must satisfy both
  3919.              ranges to be included.  For example, /[d2-8-94,2-9-94]
  3920.              /[s1024,2048] means files last modified between February 8 and
  3921.              February 9, 1994, which are also between 1,024 and 2,048 bytes
  3922.              long.
  3923.  
  3924.              When you use a date, time, or size range in a command, it
  3925.              should immediately follow the command name.  Unlike some
  3926.              command switches which apply to only part of the command line,
  3927.              the range usually applies to all file names specified for the
  3928.              command.  Any exceptions are noted in the descriptions of
  3929.              individual commands.
  3930.  
  3931.              For example, to get a directory of all the *.C files dated
  3932.              October 1, 1993, you could use this command:
  3933.  
  3934.                   c:\> dir /[d10-1-93,+0] *.c
  3935.  
  3936.              To delete all of the 0-byte files on your hard disk, you could
  3937.              use this command:
  3938.  
  3939.                   c:\> del /[s0,0] *.* /s
  3940.  
  3941.              And to copy all of the non-zero byte files that you changed
  3942.              yesterday or today to your floppy disk, you can use this
  3943.              command:
  3944.  
  3945.                   c:\> copy /[d-1] /[s1] *.* a:
  3946.  
  3947.              Date, time, and size ranges can be used with the ATTRIB, COPY,
  3948.              DEL, DESCRIBE, DIR, EXCEPT, FOR, LIST, MOVE, RD, REN, SELECT,
  3949.              and TYPE commands.  They cannot be used with filename
  3950.              completion or in filename arguments for variable functions.
  3951.  
  3952.          ##  It can be complex to type all of the elements of a range,
  3953.              especially when it involves multiple dates and times.  In this
  3954.              case you may find it easier to use aliases for common
  3955.              operations.  For example, if you often wish to select from
  3956.  
  3957.         -------------------------------------------------------------------
  3958.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 63
  3959.  
  3960.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  3961.         -------------------------------------------------------------------
  3962.  
  3963.              .DAT files modified over the last three days and copy the
  3964.              selected files to the floppy disk, you might define an alias
  3965.              like this:
  3966.  
  3967.                   alias workback `select /[d-2] copy (*.dat) a:`
  3968.  
  3969.              For more complex requirements, you may want to use internal
  3970.              variables (e.g. _DATE or _TIME, see page 97) and variable
  3971.              functions (e.g. @DATE, @TIME, @MAKEDATE, @MAKETIME, @FILEDATE,
  3972.              @FILETIME, or @EVAL, see page 105).  These variables and
  3973.              functions allow you to perform arithmetic and date / time
  3974.              calculations.
  3975.  
  3976.  
  3977.              Multiple Filenames
  3978.  
  3979.              Most file processing commands can work with multiple files at
  3980.              one time.  To use multiple file names, you simply list the
  3981.              files one after another on the command line, separated by
  3982.              spaces.  You can use wildcards in any or all of the filenames.
  3983.              For example, to copy all .TXT and .DOC files from the current
  3984.              directory to drive A, you could use this command:
  3985.  
  3986.                   c:\> copy *.txt *.doc a:
  3987.  
  3988.              If the files you want to work with are not in the default
  3989.              directory, you must include the full path with each filename:
  3990.  
  3991.                   c:\> copy a:\details\file1.txt a:\details\file1.doc c:
  3992.  
  3993.              Multiple filenames are handy when you want to match a group of
  3994.              files which cannot be defined with a single filename and
  3995.              wildcards.  They let you be very specific about which files
  3996.              you want to work with in a command.
  3997.  
  3998.          !   When you use multiple filenames with a command that expects
  3999.              both a source and a destination, like COPY or MOVE, be sure
  4000.              that you always include a specific destination on the command
  4001.              line.  If you don't, the command will assume that the last
  4002.              filename is the destination and may overwrite important files.
  4003.  
  4004.              Like extended wildcards and include lists (see below), the
  4005.              multiple filename feature will work with internal commands but
  4006.              not with external programs, unless those programs have been
  4007.              written to handle multiple file names on the command line.
  4008.  
  4009.              If you have a list of files to process that's too long to put
  4010.              on the command line or too time-consuming to type, see the
  4011.  
  4012.  
  4013.         -------------------------------------------------------------------
  4014.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 64
  4015.  
  4016.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  4017.         -------------------------------------------------------------------
  4018.  
  4019.              SELECT command on page 299 for another way of passing multiple
  4020.              file names to a command.
  4021.  
  4022.  
  4023.              Include Lists
  4024.  
  4025.              Any internal command that accepts multiple filenames will also
  4026.              accept one or more include lists.  An include list is simply a
  4027.              group of filenames, with or without wildcards, separated by
  4028.              semicolons [;].  All files in the include list must be in the
  4029.              same directory.  You may not add a space on either side of the
  4030.              semicolon.
  4031.  
  4032.              If you used an include list instead of multiple file names for
  4033.              the previous examples, they would look like this:
  4034.  
  4035.                   c:\> copy *.txt;*.doc a:
  4036.                   c:\> copy a:\details\file1.txt;file1.doc c:
  4037.  
  4038.              Include lists are similar to multiple filenames, but have
  4039.              three important differences.  First, you don't have to repeat
  4040.              the path to your files if you use an include list, because all
  4041.              of the included files must be in the same directory.  Second,
  4042.              if you use include lists, you aren't as likely to accidentally
  4043.              overwrite files if you forget a destination path for commands
  4044.              like COPY, because the last name in the list will be part of
  4045.              the include list, and won't be seen as the destination file
  4046.              name.  (Include lists can only be used as the source parameter
  4047.              - the location files are coming from - for COPY and other
  4048.              similar commands.  They cannot be used to specify a
  4049.              destination for files.)
  4050.  
  4051.              Third, multiple filenames and include lists are processed
  4052.              differently by the DIR and SELECT commands.  If you use
  4053.              multiple filenames, all of the files matching the first
  4054.              filename are processed, then all of the files matching the
  4055.              second name, and so on.  When you use an include list, all
  4056.              files that match any entry in the include list are processed
  4057.              together, and will appear together in the directory display or
  4058.              SELECT list.  You can see this difference clearly if you
  4059.              experiment with both techniques and the DIR command.  For
  4060.              example,
  4061.  
  4062.                   c:\> dir *.txt *.doc
  4063.  
  4064.              will list all the .TXT files with a directory header, the file
  4065.              list, and a summary of the total number of files and bytes
  4066.              used.  Then it will do the same for the .DOC files.  However,
  4067.  
  4068.  
  4069.         -------------------------------------------------------------------
  4070.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 65
  4071.  
  4072.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  4073.         -------------------------------------------------------------------
  4074.  
  4075.                   c:\> dir *.txt;*.doc
  4076.  
  4077.              will display all the files in one list.
  4078.  
  4079.              Like extended wildcards and multiple filenames (see above),
  4080.              the include list feature will work with internal commands, but
  4081.              not with external programs (unless they have been programmed
  4082.              especially to support it).
  4083.  
  4084.  
  4085.              Executable Extensions
  4086.  
  4087.              Normally, when you type a filename (as opposed to an alias or
  4088.              internal command name) as the first word on the command line,
  4089.              the command processor looks for a file with that name to
  4090.              execute.  The file's extension may be .EXE or .COM to indicate
  4091.              that it contains a program, or it may have a batch file
  4092.              extension like .BTM (under OS/2, a file's contents may also
  4093.              indicate that it is executable).
  4094.  
  4095.              The exact list of default extensions for executable files
  4096.              varies slightly depending on which operating system you use,
  4097.              because each has its own rules for batch file extensions(see
  4098.              page 20 for details).
  4099.  
  4100.              You can add to this default list of extensions, and have 4DOS,
  4101.              4OS2, or 4DOS/NT take the action you want with files that are
  4102.              not executable programs or batch files.  The action taken is
  4103.              always based on the file's extension.  For example, you could
  4104.              start your text editor whenever you type the name of a .DOC
  4105.              file, or start your database manager whenever you type the
  4106.              name of a .DAT file.
  4107.  
  4108.              Environment variables define the internal command, external
  4109.              program, batch file, or alias to run for each defined file
  4110.              extension.  To create an executable extension, use the SET
  4111.              command to create a new environment variable.  An environment
  4112.              variable is recognized as an executable extension if its name
  4113.              begins with a period.
  4114.  
  4115.              For example, if you want to run a word processor called EDITOR
  4116.              whenever you type the name of a file that has an extension of
  4117.              .EDT, you could use this command:
  4118.  
  4119.                   c:\> set .edt=c:\edit\editor.exe
  4120.  
  4121.              The syntax for creating an executable extension is:
  4122.  
  4123.                   set .ext=command [options]
  4124.  
  4125.         -------------------------------------------------------------------
  4126.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 66
  4127.  
  4128.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  4129.         -------------------------------------------------------------------
  4130.  
  4131.              where .EXT is the executable file extension; command is the
  4132.              name of the internal command, external program, alias, or
  4133.              batch file to run; and [options] are any command-line startup
  4134.              options you want to specify for the program, batch file, or
  4135.              alias.
  4136.  
  4137.              If the command is a batch file or external program, the
  4138.              command processor will search the PATH for it if necessary.
  4139.              However, you can make sure that the correct program or batch
  4140.              file is used, and speed up the executable extension, by
  4141.              specifying the full name including drive, path, filename, and
  4142.              extension.
  4143.  
  4144.              Once an executable extension is defined, any time you name a
  4145.              file with that extension the corresponding program, batch
  4146.              file, or alias is started, with the name of your file passed
  4147.              to it as a parameter.
  4148.  
  4149.              The following example defines QBASIC.EXE as the processor for
  4150.              .BAS files:
  4151.  
  4152.                   c:\> set .bas=c:\dos\qbasic.exe /run
  4153.  
  4154.              With this definition, if you have a file named PUSHCART.BAS in
  4155.              the current directory and enter the command:
  4156.  
  4157.                   c:\> pushcart
  4158.  
  4159.              the command processor will execute the command:
  4160.  
  4161.                   c:\dos\qbasic.exe /run pushcart.bas
  4162.  
  4163.              The next example defines B.EXE (the Brief text editor) as the
  4164.              processor for .C files:
  4165.  
  4166.                   c:\> set .c=c:\brief\b.exe -Mxyz
  4167.  
  4168.              Now, if you have a file called HELLO.C and enter the command
  4169.  
  4170.                   c:\> hello -i30
  4171.  
  4172.              This will be expanded to:
  4173.  
  4174.                   c:\brief\b.exe -Mxyz hello.c -i30
  4175.  
  4176.              Notice that the text from the .C environment variable is
  4177.              inserted at the beginning of the line, including any options,
  4178.              followed by the original file name plus its extension, and
  4179.              then the remainder of the original command line.
  4180.  
  4181.         -------------------------------------------------------------------
  4182.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 67
  4183.  
  4184.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  4185.         -------------------------------------------------------------------
  4186.  
  4187.              In order for executable extensions to work, the command,
  4188.              program, batch file, or alias must be able to interpret the
  4189.              command line properly.  For example, if a program you want to
  4190.              run doesn't accept a file name on its command line as shown in
  4191.              these examples, then executable extensions won't work with
  4192.              that program.
  4193.  
  4194.              The search for executable files starts in the current
  4195.              directory, then proceeds to each subdirectory specified by the
  4196.              PATH environment variable (if a "." is used in the PATH the
  4197.              current directory is not searched first; see the PATH command
  4198.              on page 276 for details).
  4199.  
  4200.              You may need to take this search order into account when using
  4201.              executable extensions.  Using the .BAS example above, if you
  4202.              had a file named FORMAT.BAS in the current directory and
  4203.              entered the command FORMAT A:, your command would run the
  4204.              QBASIC processor specified by the executable extension,
  4205.              instead of finding the standard DOS FORMAT command as you
  4206.              intended.  You can get around this by remembering that the DOS
  4207.              FORMAT command is in the file FORMAT.COM.  If you entered the
  4208.              command FORMAT.COM A: then the .BAS executable extension would
  4209.              not match, and the search would continue until it found the
  4210.              FORMAT.COM file.
  4211.  
  4212.          ##  Executable extensions may include wildcards, so you could, for
  4213.              example, run your text editor for any file with an extension
  4214.              beginning with T by defining an executable extension called
  4215.              .T*.  Extended wildcards (e.g., DO[CT] for .DOC and .DOT
  4216.              files) may also be used.
  4217.  
  4218.  
  4219.         ##  Advanced Features
  4220.  
  4221.              The next three features are designed for advanced users.  If
  4222.              you are a novice user, you might want to skim over this
  4223.              section and return to it as your computing skills and needs
  4224.              progress.
  4225.  
  4226.  
  4227.              Conditional Commands
  4228.  
  4229.              When an internal command or external program finishes, it
  4230.              returns a result called the exit code.  Conditional commands
  4231.              allow you to perform tasks based upon the previous command's
  4232.              exit code.  Many programs return a 0 if they are successful
  4233.              and a non-zero value if they encounter an error.
  4234.  
  4235.  
  4236.  
  4237.         -------------------------------------------------------------------
  4238.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 68
  4239.  
  4240.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  4241.         -------------------------------------------------------------------
  4242.  
  4243.              If you separate two commands by && (AND), the second command
  4244.              will be executed only if the first returns an exit code of 0.
  4245.              For example, the following command will only erase files if
  4246.              the BACKUP operation succeeds:
  4247.  
  4248.                   c:\> backup c:\ a: && del c:\*.bak;*.lst
  4249.  
  4250.              If you separate two commands by || (OR), the second command
  4251.              will be executed only if the first returns a non-zero exit
  4252.              code.  For example, if the following BACKUP operation fails,
  4253.              then ECHO will display a message:
  4254.  
  4255.                   c:\> backup c:\ a: || echo Error in the backup!
  4256.  
  4257.              All internal commands return an exit code, but not all
  4258.              external programs do.  Conditional commands will behave
  4259.              unpredictably if you use them with external programs which do
  4260.              not return an explicit exit code.
  4261.  
  4262.  
  4263.              Command Grouping
  4264.  
  4265.              Command grouping allows you to logically group a set of
  4266.              commands together by enclosing them in parentheses.  The
  4267.              parentheses are similar in function to the BEGIN and END block
  4268.              statements in some programming languages.
  4269.  
  4270.              There are two primary uses for command grouping.  One is to
  4271.              execute multiple commands in a place where normally only a
  4272.              single command is allowed.  For example, suppose you want to
  4273.              copy then rename all the .WKQ files on drives A: and B: using
  4274.              the FOR command.  You could do it like this:
  4275.  
  4276.                   c:\> for %drv in (A B) do copy %drv:*.wkq d:\wksave\
  4277.                   c:\> for %drv in (A B) do ren %drv:*.wkq *.old
  4278.  
  4279.              But with command grouping you can do the same thing in one
  4280.              command (enter this on one line):
  4281.  
  4282.                   c:\> for %drv in (A B) do (copy %drv:*.wkq d:\wksave\
  4283.                        ^ ren %drv:*.wkq *.sav)
  4284.  
  4285.              The COPY and REN commands enclosed in the parentheses appear
  4286.              to FOR as if they were a single command, so both commands are
  4287.              executed for every element of the FOR list.  (To try a command
  4288.              like this under 4OS2 or 4DOS/NT, replace the caret [^] with an
  4289.              ampersand [&].)
  4290.  
  4291.  
  4292.  
  4293.         -------------------------------------------------------------------
  4294.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 69
  4295.  
  4296.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  4297.         -------------------------------------------------------------------
  4298.  
  4299.              This kind of command grouping is most useful with the EXCEPT,
  4300.              FOR, GLOBAL, and IF commands.  You cannot use command grouping
  4301.              to make SELECT execute several commands, because SELECT will
  4302.              assume that the parentheses are marking the list of files from
  4303.              which to select, and will display an error message or give
  4304.              incorrect results if you try to use parentheses for command
  4305.              grouping instead.  (You can use a SELECT command inside the
  4306.              command grouping parentheses, you just can't use command
  4307.              grouping to specify a group of commands for SELECT to
  4308.              execute.)
  4309.  
  4310.              The second common use of command grouping is to redirect input
  4311.              or output for several commands without repeatedly using the
  4312.              redirection symbols.  For example, consider the following
  4313.              batch file fragment which places some header lines (including
  4314.              today's date) and directory displays in an output file using
  4315.              redirection.  The first ECHO command creates the file using >,
  4316.              and the other commands append to the file using >>:
  4317.  
  4318.                   echo Data files %_date > filelist
  4319.                   dir *.dat >> filelist
  4320.                   echo. >> filelist
  4321.                   echo Text files %_date >> filelist
  4322.                   dir *.txt >> filelist
  4323.  
  4324.              Using command grouping, these commands can be written much
  4325.              more simply.  Enter this example on one line (use an ampersand
  4326.              [&] as the command separator if you try this under 4OS2 or
  4327.              4DOS/NT):
  4328.  
  4329.                   (echo Data files %_date ^ dir *.dat ^ echo. ^ echo Text
  4330.                   files %_date ^ dir *.txt) > filelist
  4331.  
  4332.              The redirection, which appears outside the parentheses,
  4333.              applies to all the commands within the parentheses.  Because
  4334.              the redirection is performed only once, the commands will run
  4335.              slightly faster than if each command was entered separately.
  4336.              The same approach can be used for input redirection and for
  4337.              piping.
  4338.  
  4339.              You can also use command grouping in a batch file or at the
  4340.              prompt to split commands over several lines.  This last
  4341.              example is like the redirection example above, but is entered
  4342.              at the prompt.  Note the "More?" prompt after each incomplete
  4343.              line.  None of the commands are executed until the command
  4344.              group is completed with the closing parenthesis.  This example
  4345.              does not have to be entered on one line:
  4346.  
  4347.                   c:\> (echo Data files %_date
  4348.  
  4349.         -------------------------------------------------------------------
  4350.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 70
  4351.  
  4352.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  4353.         -------------------------------------------------------------------
  4354.  
  4355.                   More? dir *.dat
  4356.                   More? echo.
  4357.                   More? echo Text files %_date
  4358.                   More? dir *.txt) > filelist
  4359.                   c:\>
  4360.  
  4361.              A group of commands in parentheses is like a long command
  4362.              line.  The total length of the group may not exceed 511
  4363.              characters in 4DOS, or 2,047 characters in 4OS2 and 4DOS/NT,
  4364.              whether the commands are entered from the prompt, an alias, or
  4365.              a batch file.  The limit includes the space required to expand
  4366.              aliases and environment variables invoked within the group.
  4367.              In addition, each line you type at the normal prompt or the
  4368.              More? prompt, and each individual command within the line,
  4369.              must meet the usual length limits:  255 characters in 4DOS, or
  4370.              1,023 characters in 4OS2 and 4DOS/NT.
  4371.  
  4372.  
  4373.              Escape Character
  4374.  
  4375.              4DOS, 4OS2, and 4DOS/NT recognize a user-definable escape
  4376.              character.  This character gives the following character a
  4377.              special meaning; it is not the same as the ASCII ESC that is
  4378.              often used in ANSI and printer control sequences.
  4379.  
  4380.              The default 4DOS escape character is Ctrl-X (ASCII 24), which
  4381.              will be displayed here - and on your screen - as an up arrow
  4382.              [-].  The default 4OS2 and 4DOS/NT escape character is a caret
  4383.              [^].
  4384.  
  4385.              If you don't like using the default escape character, you can
  4386.              pick another character using the SETDOS /E command (see page
  4387.              310) or the EscapeChar directive in your .INI file (see page
  4388.              132).  If you plan to share aliases or batch files between
  4389.              4DOS, 4OS2, and 4DOS/NT, see page 72 for details about
  4390.              choosing compatible escape characters for two or more
  4391.              products.
  4392.  
  4393.              Eight special characters are recognized when they are preceded
  4394.              by the escape character.  The combination of the escape
  4395.              character and one of these characters is translated to a
  4396.              single character, as shown below.  These are useful for
  4397.              redirecting codes to the printer; -e is also useful to
  4398.              generate ANSI "escape sequences" in your PROMPT, ECHO, or
  4399.              other output commands; and -r can be used in keystroke
  4400.              aliases.  The special characters which can follow the escape
  4401.              character are:
  4402.  
  4403.                   b      backspace
  4404.  
  4405.         -------------------------------------------------------------------
  4406.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 71
  4407.  
  4408.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  4409.         -------------------------------------------------------------------
  4410.  
  4411.                   c      comma
  4412.                   e      the ASCII ESC character (ASCII 27)
  4413.                   f      form feed
  4414.                   n      line feed
  4415.                   r      carriage return
  4416.                   s      space
  4417.                   t      tab character
  4418.  
  4419.              If you follow the escape character with any other character,
  4420.              the escape character is removed and the second character is
  4421.              copied directly to the command line.  This allows you to
  4422.              suppress the normal meaning of special characters (such as ? *
  4423.              / \ | " ` > < and &).
  4424.  
  4425.              For example, to send a form feed followed by the sequence ESC
  4426.              Y to the printer, you can use this command:
  4427.  
  4428.                   c:\> echos -f-eY > prn
  4429.  
  4430.  
  4431.         4DOS, 4OS2, and 4DOS/NT Compatibility
  4432.  
  4433.              4DOS, 4OS2, and 4DOS/NT are highly compatible with each other.
  4434.              However, there are minor differences between them.  These
  4435.              differences are caused by the different requirements of each
  4436.              operating system and by our design goal of maintaining
  4437.              compatibility between each product and the default command
  4438.              processor which it replaces.
  4439.  
  4440.              We discuss the differences between our products in this manual
  4441.              as part of the description of each feature and command.  Most
  4442.              of the differences are minor:  different command line lengths,
  4443.              a few different options in some commands, and some commands
  4444.              that only make sense in one or two products.
  4445.  
  4446.              If you use two or more of our products, or if you want to
  4447.              share aliases and batch files with users of different
  4448.              products, you need to be aware of the differences in three
  4449.              important characters:  the Command Separator (see page 45),
  4450.              the Escape Character (page 71), and the Parameter Character
  4451.              (page 78).
  4452.  
  4453.              The default values of each of these characters in each product
  4454.              is shown in the following chart:
  4455.  
  4456.                   Character           4DOS Default   4OS2 and 4NT Default
  4457.  
  4458.                   Command Separator        ^              &
  4459.                   Escape Character         -(Ctrl-X)      ^
  4460.  
  4461.         -------------------------------------------------------------------
  4462.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 72
  4463.  
  4464.                                   CHAPTER 3 / USING 4DOS, 4OS2, AND 4DOS/NT
  4465.         -------------------------------------------------------------------
  4466.  
  4467.                   Parameter Character      &              $
  4468.  
  4469.              In your batch files and aliases, and even at the command line,
  4470.              you can smooth over these differences in two ways:
  4471.  
  4472.                   * Select a consistent set of characters with .INI file
  4473.                     directives (see page 120) or the SETDOS command (page
  4474.                     308).  For example, to set the 4DOS characters to
  4475.                     match 4OS2 and 4DOS/NT, use:
  4476.  
  4477.                             CommandSep = &
  4478.                             EscapeChar = ^
  4479.                             ParameterChar = $
  4480.  
  4481.                     in 4DOS.INI, or use the command:
  4482.  
  4483.                             SETDOS /C& /P$ /E-^
  4484.  
  4485.                     (Note the use of the old escape character [-] before
  4486.                     the new one [^].  This is because the new escape
  4487.                     character is also the old command separator, and will
  4488.                     be interpreted as the end of the command if it does
  4489.                     not have an escape character before it!)
  4490.  
  4491.                   * Use internal variables that contain the current
  4492.                     special character, rather than using the character
  4493.                     itself (see page 97).  For example, this command:
  4494.  
  4495.                             if "%1" == "" (echo Argument missing! ^ quit)
  4496.  
  4497.                     will only work if the command separator is a caret.
  4498.                     However, this version works regardless of the current
  4499.                     command separator:
  4500.  
  4501.                             if "%1" == "" (echo Argument missing! %+ quit)
  4502.  
  4503.              The following chart shows the correspondence between the
  4504.              appropriate SETDOS command options, .INI file directives, and
  4505.              internal variables:
  4506.  
  4507.                   Special            SETDOS   INI File     Internal
  4508.                   Character          Switch   Directive    Variable
  4509.  
  4510.                   Command Separator   /C      CommandSep     %+
  4511.                   Escape Character    /E      EscapeChar     %=
  4512.                   Parameter Character /P      ParameterChar  (none)
  4513.  
  4514.  
  4515.  
  4516.  
  4517.         -------------------------------------------------------------------
  4518.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 73
  4519.  
  4520.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  4521.         -------------------------------------------------------------------
  4522.  
  4523.  
  4524.         CHAPTER 4 / ALIASES AND BATCH FILES
  4525.  
  4526.  
  4527.         This chapter introduces two of the most powerful features of 4DOS,
  4528.         4OS2, and 4DOS/NT:  aliases and batch files.  It also discusses the
  4529.         environment (a list of information available to all programs),
  4530.         along with the command processor's internal variables and variable
  4531.         functions.  The discussion of the environment, variables, and
  4532.         variable functions is included in this chapter because they are
  4533.         most often used in aliases and batch files.
  4534.  
  4535.  
  4536.         Aliases
  4537.  
  4538.              Much of the power of 4DOS, 4OS2, and 4DOS/NT comes together in
  4539.              aliases, which give you the ability to create your own
  4540.              commands.  An alias is a name that you select for a command or
  4541.              group of commands.  Simple aliases substitute a new name for
  4542.              an existing command.  More complex aliases can redefine the
  4543.              default settings of internal or external commands, operate as
  4544.              very fast in-memory batch files, and perform commands based on
  4545.              the results of other commands.
  4546.  
  4547.              This section of the manual will show you some examples of the
  4548.              power of aliases.  See the ALIAS command (page 155) for
  4549.              complete details about writing your own aliases.
  4550.  
  4551.              The simplest type of alias gives a new name to an existing
  4552.              command.  For example, you could create a command called ROOT
  4553.              to switch to the root directory this way:
  4554.  
  4555.                   c:\> alias root = cd \
  4556.  
  4557.              After the alias has been defined this way, every time you type
  4558.              the command ROOT, you will actually execute the command CD \.
  4559.  
  4560.              Aliases can also create customized versions of commands.  For
  4561.              example, the DIR command can sort a directory in various ways.
  4562.              You can create an alias called DE that means "sort the
  4563.              directory by filename extension, and pause after each page
  4564.              while displaying it" like this:
  4565.  
  4566.                   c:\> alias de = dir /oe /p
  4567.  
  4568.              Aliases can be used to execute sequences of commands as well.
  4569.              The following command creates an alias called W which saves
  4570.              the current drive and directory, changes to the WP directory
  4571.              on drive C, runs the program E:\WP60\WP.EXE, and, when the
  4572.  
  4573.         -------------------------------------------------------------------
  4574.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 74
  4575.  
  4576.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  4577.         -------------------------------------------------------------------
  4578.  
  4579.              program terminates, returns to the original drive and
  4580.              directory:
  4581.  
  4582.                   c:\> alias w = `pushd c:\wp ^ e:\wp60\wp.exe ^ popd`
  4583.  
  4584.              This alias is enclosed in back-quotes because it contains
  4585.              multiple commands.  You must use the back-quotes whenever an
  4586.              alias contains multiple commands, environment variables,
  4587.              parameters (see below), redirection, or piping.  See the ALIAS
  4588.              command for full details.  Also, please note that throughout
  4589.              this section we use the 4DOS command separator, a caret [^],
  4590.              to separate multiple commands.  If you are using 4OS2 or
  4591.              4DOS/NT, substitute an ampersand [&] for the caret in the
  4592.              examples.
  4593.  
  4594.              Aliases can be nested, that is, one alias can invoke another.
  4595.              For example, the alias above could also be written as:
  4596.  
  4597.                   c:\> alias wp = e:\wp60\wp.exe
  4598.                   c:\> alias w = `pushd c:\wp ^ wp ^ popd`
  4599.  
  4600.              If you enter W as a command, the command processor will
  4601.              execute the PUSHD command, detect that the next command (WP)
  4602.              is another alias, and execute the program E:\WP60\WP.EXE, and
  4603.              - when the program exits - return to the first alias, execute
  4604.              the POPD command, and return to the prompt.
  4605.  
  4606.              You can use aliases to change the default options for both
  4607.              internal commands and external commands.  Suppose that you
  4608.              always want the DEL command to prompt before it erases a file:
  4609.  
  4610.                   c:\> alias del = *del /p
  4611.  
  4612.              An asterisk [*] is used in front of the second "del" to show
  4613.              that it is the name of an internal command, not an alias.  See
  4614.              page 157 for more information about this use of the asterisk.
  4615.  
  4616.              You may have a program on your system that has the same name
  4617.              as an internal command.  Normally, if you type the command
  4618.              name, you will start the internal command rather than the
  4619.              program you desire, unless you explicitly add its full path on
  4620.              the command line.  For example, if you have a program named
  4621.              LIST.COM in the C:\UTIL directory, you could run it with the
  4622.              command C:\UTIL\LIST.COM.  However, if you simply type LIST,
  4623.              the internal LIST command will be invoked instead.  Aliases
  4624.              give you two ways to get around this problem.
  4625.  
  4626.              First, you could define an alias that runs the program in
  4627.              question, but with a different name:
  4628.  
  4629.         -------------------------------------------------------------------
  4630.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 75
  4631.  
  4632.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  4633.         -------------------------------------------------------------------
  4634.  
  4635.                   c:\> alias l = c:\util\list.com
  4636.  
  4637.              Another approach is to rename the internal command and use the
  4638.              original name for the external program.  The following example
  4639.              renames the LIST command as DISPLAY and then uses a second
  4640.              alias to run LIST.COM whenever you type LIST:
  4641.  
  4642.                   c:\> alias display = *list
  4643.                   c:\> alias list = c:\util\list.com
  4644.  
  4645.              You can also assign an alias to a key, so that every time you
  4646.              press the key, the command will be invoked.  You do so by
  4647.              naming the alias with an at sign [@] followed by a key name.
  4648.              After you enter this next example, you will see a 2-column
  4649.              directory with paging whenever you press Shift-F5, then Enter:
  4650.  
  4651.                   c:\> alias @Shift-F5 = *dir /2/p
  4652.  
  4653.              This alias will put the DIR command on the command line when
  4654.              you press Shift-F5, then wait for you to enter file names or
  4655.              additional switches.  You must press Enter when you are ready
  4656.              to execute the command.  You can change this alias so that it
  4657.              executes the command immediately, and does not display it on
  4658.              the command line or wait for you to type a filename.  To do
  4659.              so, use two at signs at the start of the alias name:
  4660.  
  4661.                   c:\> alias @@Shift-F5 = *dir /2/p
  4662.  
  4663.              The next example clears the screen whenever you press Alt-F1:
  4664.  
  4665.                   c:\> alias @@Alt-F1 = cls
  4666.  
  4667.              Aliases have many other capabilities as well.  This example
  4668.              creates a simple command-line calculator.  Once you have
  4669.              entered the example, you can type CALC 4*19, for example, and
  4670.              you will see the answer:
  4671.  
  4672.                   c:\> alias calc = `echo The answer is:  %@eval[%&]`
  4673.  
  4674.              Our last example in this section creates an alias called IN.
  4675.              It will temporarily change directories, run an internal or
  4676.              external command, and then return to the current directory
  4677.              when the command is finished:
  4678.  
  4679.                   c:\> alias in = `pushd %1 ^ %2& ^ popd`
  4680.  
  4681.              Now if you type
  4682.  
  4683.                   c:\> in c:\letters wp letter.txt
  4684.  
  4685.         -------------------------------------------------------------------
  4686.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 76
  4687.  
  4688.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  4689.         -------------------------------------------------------------------
  4690.  
  4691.              you will change to the C:\LETTERS subdirectory, execute the
  4692.              command WP LETTER.TXT and then return to the current
  4693.              directory.
  4694.  
  4695.              Your copy of 4DOS, 4OS2, or 4DOS/NT  includes a sample alias
  4696.              file called ALIASES which contains several useful aliases and
  4697.              demonstrates many alias techniques.  Also, see the ALIAS and
  4698.              UNALIAS commands on pages 155 and 335 for more information and
  4699.              examples.  See page 84 for tips about using aliases inside
  4700.              your batch files.
  4701.  
  4702.  
  4703.         Batch Files
  4704.  
  4705.              A batch file is a file that contains a list of commands to
  4706.              execute.  4DOS, 4OS2, and 4DOS/NT read and interpret each line
  4707.              as if it had been typed at the keyboard.  Like aliases, batch
  4708.              files are handy for automating computing tasks.  Unlike
  4709.              aliases, batch files can be as long as you wish.  Batch files
  4710.              take up separate disk space for each file, and can't usually
  4711.              execute quite as quickly as aliases, since they must be read
  4712.              from the disk.
  4713.  
  4714.  
  4715.              .BAT, .CMD, and .BTM Files
  4716.  
  4717.              A batch file can run in two different modes.  In the first,
  4718.              traditional mode, each line of the batch file is read and
  4719.              executed individually.  In the second mode, the entire batch
  4720.              file is read into memory at once.  The second mode can be 5 to
  4721.              10 times faster, especially if most of the commands in the
  4722.              batch file are internal commands.  However, only the first
  4723.              mode can be used for self-modifying batch files (which are
  4724.              rare), for batch files which install memory-resident utilities
  4725.              under DOS, and for batch files larger than 64K bytes.
  4726.  
  4727.              The batch file's extension determines its mode.  Files with a
  4728.              .BAT extension (in 4DOS and 4DOS/NT), or a .CMD extension (in
  4729.              4OS2 and 4DOS/NT) are run in the slower, traditional mode.
  4730.              Files with a .BTM extension are run in the faster, more
  4731.              efficient mode.  You can change the execution mode inside a
  4732.              batch file with the LOADBTM command (see page 263).
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.         -------------------------------------------------------------------
  4742.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 77
  4743.  
  4744.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  4745.         -------------------------------------------------------------------
  4746.  
  4747.              Echoing
  4748.  
  4749.              By default, each line in a batch file is displayed or "echoed"
  4750.              as it is executed.  You can change this behavior, if you want,
  4751.              in several different ways:
  4752.  
  4753.                   Any batch file line that begins with an [@] symbol will
  4754.                   not be displayed.
  4755.  
  4756.                   The display can be turned off and on within a batch file
  4757.                   with the ECHO OFF and ECHO ON commands.
  4758.  
  4759.                   The default setting can be changed with the SETDOS /V
  4760.                   command (see page 312) or the BatchEcho directive in the
  4761.                   .INI file (see page 131).
  4762.  
  4763.              For example, the following line turns off echoing inside a
  4764.              batch file.  The [@] symbol keeps the batch file from
  4765.              displaying the ECHO OFF command:
  4766.  
  4767.                   @echo off
  4768.  
  4769.              Your command processor also has a command line echo that is
  4770.              unrelated to the batch file echo setting.  See the ECHO
  4771.              command on page 214 for details about both settings.
  4772.  
  4773.  
  4774.              Batch File Parameters
  4775.  
  4776.              Like aliases and application programs, batch files can examine
  4777.              the command line that is used to invoke them.  The command
  4778.              tail (everything on the command line after the batch file
  4779.              name) is separated into individual parameters (also called
  4780.              arguments or batch variables) by scanning for the spaces,
  4781.              tabs, and commas that separate the parameters.  A batch file
  4782.              can work with the individual parameters or with the command
  4783.              tail as a whole.
  4784.  
  4785.              These parameters are numbered from %1 to %127.  %1 refers to
  4786.              the first parameter on the command line, %2 to the second, and
  4787.              so on.  It is up to the batch file to determine the meaning of
  4788.              each parameter.  You can use quotation marks to pass spaces,
  4789.              tabs, commas, and other special characters in a batch file
  4790.              parameter; see page 118 for details.
  4791.  
  4792.              Parameters that are referred to in a batch file, but which are
  4793.              missing on the command line, appear as empty strings inside
  4794.              the batch file.  For example, if you start a batch file and
  4795.              put two parameters on the command line, any reference in the
  4796.  
  4797.         -------------------------------------------------------------------
  4798.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 78
  4799.  
  4800.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  4801.         -------------------------------------------------------------------
  4802.  
  4803.              batch file to %3, or any higher-numbered parameter, will be
  4804.              interpreted as an empty string.
  4805.  
  4806.              A batch file can also work with three special parameters:  %0
  4807.              contains the name of the batch file as it was entered on the
  4808.              command line, %# contains the number of command line
  4809.              arguments, and in 4DOS %n& contains the complete command-line
  4810.              tail starting with argument number "n" (for example, %3& means
  4811.              the third parameter and all those after it).  The default
  4812.              value of "n" is 1, so %& contains the entire command tail.
  4813.              The values of these special parameters will change if you use
  4814.              the SHIFT command (see page 316).
  4815.  
  4816.      4OS2,   By default, 4OS2 and 4DOS/NT use a dollar sign [$] instead of
  4817.      4NT     an ampersand [&] to indicate the remainder of the command
  4818.              tail.  For example, %$ means all the parameters, and %2$ means
  4819.              the second parameter and all those after it.  If you want to
  4820.              share batch files or aliases between 4DOS and these command
  4821.              processors, you can select a new character for any product
  4822.              with the SETDOS /P command (see page 311) or the ParameterChar
  4823.              directive in your .INI file (see page 134).
  4824.  
  4825.              For example, if your batch file interprets the first argument
  4826.              as a subdirectory name then the following line would move to
  4827.              the specified directory:
  4828.  
  4829.                   cd %1
  4830.  
  4831.              A friendlier batch file would check to make sure the directory
  4832.              exists and take some special action if it doesn't:
  4833.  
  4834.                   iff isdir %1 then ^ cd %1
  4835.                   else ^ echo Subdirectory %1 does not exist! ^ quit
  4836.                   endiff
  4837.  
  4838.              (see the IF and IFF commands on pages 238 and 244).
  4839.  
  4840.          ##  Batch files can also use environment variables, internal
  4841.              variables, and variable functions.  See pages 97 - 115 for a
  4842.              complete list of the internal variables and variable functions
  4843.              available.  You can use these variables and functions to
  4844.              determine system status (e.g., the type of CPU in the system),
  4845.              resource levels (e.g., the amount of free disk space), file
  4846.              information (e.g., the date and time a file was last
  4847.              modified), and other information (e.g., the current date and
  4848.              time).  You can also perform arithmetic operations (including
  4849.              date and time arithmetic), manipulate strings and substrings,
  4850.              extract parts of a filename, and perform simple file access.
  4851.  
  4852.  
  4853.         -------------------------------------------------------------------
  4854.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 79
  4855.  
  4856.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  4857.         -------------------------------------------------------------------
  4858.  
  4859.          ##  To create temporary variables for use inside a batch file,
  4860.              just use the SET command to store the information you want in
  4861.              an environment variable.  Pick a variable name that isn't
  4862.              likely to be in use by some other program (for example, PATH
  4863.              would be a bad choice), and use the UNSET command (page 336)
  4864.              to remove these variables from the environment at the end of
  4865.              your batch file.  You can use SETLOCAL (page 315) and ENDLOCAL
  4866.              (page 217) to create a "local" environment so that the
  4867.              original environment will be restored when your batch file is
  4868.              finished.
  4869.  
  4870.          ##  Environment variables used in a batch file may contain either
  4871.              numbers or text.  It is up to you to keep track of what's in
  4872.              each variable and use it appropriately; if you don't (for
  4873.              example, if you use %@EVAL to add a number to a text string),
  4874.              you'll get an error message.
  4875.  
  4876.  
  4877.              Batch File Commands
  4878.  
  4879.              Several 4DOS, 4OS2, and 4DOS/NT commands are particularly
  4880.              suited to batch file processing.  Each command is explained in
  4881.              detail in the Command Reference section of this manual,
  4882.              beginning on page 146.  Here is a list of some of the commands
  4883.              you might find most useful:
  4884.  
  4885.                   BEEP produces a sound of any pitch and duration through
  4886.                   the computer's speaker.
  4887.  
  4888.                   CALL executes one batch file from within another.
  4889.  
  4890.                   CANCEL terminates all batch file processing.
  4891.  
  4892.                   CLS and COLOR set the screen display colors.
  4893.  
  4894.                   DO starts a loop.  The loop can be based on a counter, or
  4895.                   on a conditional test like those used in IF and IFF.
  4896.  
  4897.                   DRAWBOX draws a box on the screen.
  4898.  
  4899.                   DRAWHLINE and DRAWVLINE draw horizontal and vertical
  4900.                   lines on the screen.
  4901.  
  4902.                   ECHO and ECHOS print text on the screen (the text can
  4903.                   also be redirected to a file or device).
  4904.  
  4905.                   GOSUB executes a subroutine inside a batch file.  The
  4906.                   RETURN command terminates the subroutine.
  4907.  
  4908.  
  4909.         -------------------------------------------------------------------
  4910.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 80
  4911.  
  4912.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  4913.         -------------------------------------------------------------------
  4914.  
  4915.                   GOTO branches to a different location in the batch file.
  4916.  
  4917.                   FOR executes commands for each file that matches a set of
  4918.                   wildcards, or each entry in a list.
  4919.  
  4920.                   IF and IFF execute commands based on a test of string or
  4921.                   numeric values, program exit codes, or other conditions.
  4922.  
  4923.                   INKEY and INPUT collect keyboard input from the user and
  4924.                   store it in environment variables.
  4925.  
  4926.                   KEYSTACK places keystrokes into the 4DOS Keystack.
  4927.  
  4928.                   LOADBTM changes the batch file operating mode.
  4929.  
  4930.                   ON initializes error handling for Ctrl-C / Ctrl-Break, or
  4931.                   for program and command errors.
  4932.  
  4933.                   PAUSE displays a message and waits for the user to press
  4934.                   a key.
  4935.  
  4936.                   QUIT ends the current batch file and optionally returns
  4937.                   an exit code.
  4938.  
  4939.                   REM places a remark in a batch file.
  4940.  
  4941.                   SCREEN positions the cursor on the screen and optionally
  4942.                   prints a message at the new location.
  4943.  
  4944.                   SCRPUT displays a message in color.
  4945.  
  4946.                   SETLOCAL saves the current disk drive, default directory,
  4947.                   environment, and alias list.  ENDLOCAL restores the
  4948.                   settings that were saved.
  4949.  
  4950.                   SHIFT changes the numbering of the parameters.
  4951.  
  4952.                   START starts another session or window in certain
  4953.                   multitasking environments.
  4954.  
  4955.                   TEXT displays a block of text.  ENDTEXT ends the block.
  4956.  
  4957.                   TIMER starts or reads a stopwatch.
  4958.  
  4959.                   VSCRPUT displays a vertical message in color.
  4960.  
  4961.              These commands, along with the internal variables and variable
  4962.              functions, make the enhanced batch file language extremely
  4963.              powerful.  Your copy of 4DOS, 4OS2, or 4DOS/NT includes a
  4964.  
  4965.         -------------------------------------------------------------------
  4966.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 81
  4967.  
  4968.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  4969.         -------------------------------------------------------------------
  4970.  
  4971.              number of sample batch files, combined in the file
  4972.              SAMPLES.BTM, that demonstrate some of the many things you can
  4973.              do with batch files.
  4974.  
  4975.  
  4976.              Interrupting a Batch File
  4977.  
  4978.              You can usually interrupt a batch file by pressing Ctrl-C or
  4979.              Ctrl-Break.  Whether and when these keystrokes are recognized
  4980.              will depend on whether the command processor or an application
  4981.              program is running, how the application (if any) was written,
  4982.              whether BREAK is ON or OFF under DOS (see page 171), and
  4983.              whether the ON BREAK command is in use (see page 274).
  4984.  
  4985.              If 4DOS, 4OS2, or 4DOS/NT detects a Ctrl-C or Ctrl-Break (and
  4986.              ON BREAK is not in use), it will display a prompt, for
  4987.              example:
  4988.  
  4989.                   Cancel batch job C:\CHARGE.BTM ? (Y/N/A) :
  4990.  
  4991.              Enter N to continue, Y to terminate the current batch file and
  4992.              continue with any batch file which called it, or A to end all
  4993.              batch file processing regardless of the batch file nesting
  4994.              level.  Answering Y is similar to the QUIT command (page 287);
  4995.              answering A is similar to the CANCEL command (page 174).
  4996.  
  4997.  
  4998.              Automatic Batch Files
  4999.  
  5000.              4DOS, 4OS2, and 4DOS/NT support three "automatic" batch files,
  5001.              files that run without your intervention, as long as the
  5002.              command processor can find them.
  5003.  
  5004.              Each time 4DOS, 4OS2, or 4DOS/NT starts as either a primary or
  5005.              a secondary shell, it looks for an automatic batch file called
  5006.              4START.BTM, 4START.BAT (for 4DOS), or 4START.CMD (for 4OS2 and
  5007.              4DOS/NT).  If the 4START batch file is not in the same
  5008.              directory as your command processor itself, you should use the
  5009.              4StartPath directive in your .INI file (see page 125) to
  5010.              specify its location.  4START is optional, so the command
  5011.              processor will not display an error message if it cannot find
  5012.              the file.
  5013.  
  5014.              4START is a convenient place to change the color or content of
  5015.              the prompt for each shell, LOG the start of a shell, or put
  5016.              other special startup or configuration commands.  Under 4OS2
  5017.              and 4DOS/NT, it is one way to set aliases and environment
  5018.              variables (under 4DOS, these are normally set in
  5019.              AUTOEXEC.BAT).
  5020.  
  5021.         -------------------------------------------------------------------
  5022.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 82
  5023.  
  5024.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5025.         -------------------------------------------------------------------
  5026.  
  5027.          ##  With the exception of some 4DOS initialization switches, the
  5028.              entire startup command line passed to the command processor is
  5029.              available to 4START via batch file parameters (%1, %2, etc.).
  5030.              This can be useful if you want to see the command line passed
  5031.              to a secondary shell by an application.  For example, to pause
  5032.              if any parameters are passed to a secondary shell you could
  5033.              include this command in 4START (enter this on one line):
  5034.  
  5035.                   if "%1" != "" .and. "%_shell" gt 0 pause Starting shell
  5036.                   %_shell with parameters [%&]
  5037.  
  5038.      4DOS    Whenever it is started as a primary shell, 4DOS runs
  5039.              AUTOEXEC.BAT immediately after 4START.  On a DOS system,
  5040.              AUTOEXEC.BAT runs each time the computer boots up.  (If
  5041.              COMMAND.COM cannot find AUTOEXEC.BAT, it asks you for the time
  5042.              and date.  4DOS skips that step and immediately displays a
  5043.              prompt.)
  5044.  
  5045.              Normally, AUTOEXEC.BAT must be in the root directory of the
  5046.              boot drive.  You can store it in a different location (and
  5047.              even give it a different name) by using the 4DOS.INI directive
  5048.              AutoExecPath (see page 125).  You can also pass parameters to
  5049.              AUTOEXEC.BAT using the AutoExecParms directive in 4DOS.INI.
  5050.  
  5051.              4OS2 and 4DOS/NT do not execute AUTOEXEC.BAT.
  5052.  
  5053.              Whenever a 4DOS, 4OS2, or 4DOS/NT shell ends, it runs a third
  5054.              automatic batch file called 4EXIT.BTM, 4EXIT.BAT (for 4DOS),
  5055.              or 4EXIT.CMD (for 4OS2 and 4DOS/NT).  This file, if you use
  5056.              it, should be in the same directory as your 4START batch file.
  5057.              Like 4START, 4EXIT is optional.  It is not necessary in most
  5058.              circumstances, but it is a convenient place to put commands to
  5059.              save information such as a history list before a shell ends,
  5060.              or LOG the end of the shell.
  5061.  
  5062.              Under 4DOS, 4START and 4EXIT should not load any memory
  5063.              resident programs (TSRs).  Otherwise, these three files can
  5064.              include any commands that could be part of any batch file or
  5065.              any commands which you could type from the command line.
  5066.  
  5067.  
  5068.           ## Detecting 4DOS, 4OS2, or 4DOS/NT
  5069.  
  5070.              From a batch file, you can determine if 4DOS, 4OS2, or 4DOS/NT
  5071.              is loaded by testing for the variable function @EVAL, with a
  5072.              test like this:
  5073.  
  5074.                   if "%@eval[2+2]" == "4" echo 4DOS is loaded!
  5075.  
  5076.  
  5077.         -------------------------------------------------------------------
  5078.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 83
  5079.  
  5080.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5081.         -------------------------------------------------------------------
  5082.  
  5083.              This test can never succeed in COMMAND.COM or CMD.EXE.  Other
  5084.              variable functions could be used for the same purpose.
  5085.  
  5086.  
  5087.           ## Using Aliases in Batch Files
  5088.  
  5089.              One way to simplify batch file programming is to use aliases
  5090.              to hide unnecessary detail inside a batch file.  For example,
  5091.              suppose you want to implement a multiple choice list in a
  5092.              batch file that will let you select among several different
  5093.              applications.  This example shows one way to do so:
  5094.  
  5095.                   alias in `pushd %1 ^ %2& ^ popd`
  5096.                   alias choice `elseiff "%userchoice"=="%1" then`
  5097.                   :dispmenu
  5098.                   screen 8 0
  5099.                   text
  5100.                        Enter your choice:
  5101.                             1. Word Processing
  5102.                             2. Spreadsheet
  5103.                             3. Communications
  5104.                   endtext
  5105.                   inkey %%userchoice
  5106.                   iff "1"=="2" then ^ rem  Always fail and go to next line
  5107.                   choice 1 ^ in d:\letters c:\wp60\wp.exe
  5108.                   choice 2 ^ in d:\finance c:\quattro\q.exe
  5109.                   choice 3 ^ in d:\comm c:\comsw\pcplus.exe
  5110.                   else
  5111.                     scrput 23 0 bri whi on red Invalid choice, try again
  5112.                     goto dispmenu
  5113.                   endiff
  5114.                   unalias in choice
  5115.  
  5116.              The first alias, IN, expects 2 or more command-line arguments.
  5117.              It uses the first as a new working directory and changes to
  5118.              that directory with a PUSHD command.  The rest of the command
  5119.              line is interpreted as another command plus possible command
  5120.              line parameters, which the alias executes.  This alias could
  5121.              be used from the command line.
  5122.  
  5123.              The second alias, CHOICE, expects one command-line argument.
  5124.              It tests whether an environment variable called userchoice has
  5125.              the same value as the command-line argument.  This alias is
  5126.              designed just for this particular batch file.  If you try to
  5127.              use CHOICE from the command line, you will see an error
  5128.              because the alias uses ELSEIFF and THEN without the necessary
  5129.              IFF and ENDIFF to define a block.  (The last line of the batch
  5130.              file "cleans up" by removing IN and CHOICE from the alias
  5131.              list.)
  5132.  
  5133.         -------------------------------------------------------------------
  5134.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 84
  5135.  
  5136.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5137.         -------------------------------------------------------------------
  5138.  
  5139.              The next 9 lines print a menu on the screen and then get a
  5140.              keystroke from the user and store the keystroke in an
  5141.              environment variable called userchoice.  Then the batch file
  5142.              tests the user's keystroke to decide what action to take.
  5143.  
  5144.              Since the CHOICE alias starts with an ELSEIFF command, there
  5145.              has to be an IFF.  But the first condition must fail in order
  5146.              to get to the ELSEIFF command in the first CHOICE alias, so
  5147.              the IFF statement starts with a condition that will always be
  5148.              false.  The three lines after the IFF are easy to follow and
  5149.              much shorter than they would be without the aliases.  If it
  5150.              had to be typed in full, the first choice line would look like
  5151.              this:
  5152.  
  5153.                   elseiff "%userchoice"=="1" then pushd d:\letters ^
  5154.                   c:\wp60\wp.exe ^ popd
  5155.  
  5156.              There's another side to aliases in batch files.  If you're
  5157.              going to distribute your batch files to others, you need to
  5158.              remember that they may have aliases defined for the commands
  5159.              you're going to use.  For example if the user has aliased CD
  5160.              to CDD and you aren't expecting this, your file may not work
  5161.              as you intended.  There are two ways to address this problem.
  5162.              First, you can use SETLOCAL, ENDLOCAL, and UNALIAS to clear
  5163.              out aliases before your batch file starts and restore them at
  5164.              the end.  For example:
  5165.  
  5166.                   setlocal
  5167.                   unalias *
  5168.                   rem Aliases cleared, set up new aliases
  5169.                   alias ...
  5170.                   rem Other batch file commands go here
  5171.                   endlocal
  5172.  
  5173.              Remember that SETLOCAL and ENDLOCAL will save and restore not
  5174.              only the aliases but also the environment and the current
  5175.              drive and directory.
  5176.  
  5177.              If this method isn't appropriate or necessary for the batch
  5178.              file you're working on, you can also use an asterisk [*]
  5179.              before the name of any command.  The asterisk means the
  5180.              command that follows it should not be interpreted as an alias.
  5181.              For example the following command redirects a list of file
  5182.              names to the file FILELIST:
  5183.  
  5184.                   dir /b > filelist
  5185.  
  5186.  
  5187.  
  5188.  
  5189.         -------------------------------------------------------------------
  5190.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 85
  5191.  
  5192.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5193.         -------------------------------------------------------------------
  5194.  
  5195.              However, if the user has redefined DIR with an alias this
  5196.              command may not do what you want.  To get around this just
  5197.              use:
  5198.  
  5199.                   *dir /b > filelist
  5200.  
  5201.              The same can be done for any command in your batch file.  If
  5202.              you use the asterisk, it will disable alias processing, and
  5203.              the rest of the command will be processed normally as an
  5204.              internal command, external command, or batch file.  Using an
  5205.              asterisk before a command will work whether or not there is
  5206.              actually an alias defined with the same name as the command.
  5207.              If there is no alias with that name, the asterisk will be
  5208.              ignored and the command will be processed as if the asterisk
  5209.              wasn't there.
  5210.  
  5211.  
  5212.           ## Debugging Batch Files
  5213.  
  5214.              There are several tricks you can use in debugging batch files.
  5215.              Probably the simplest is to turn ECHO on at the beginning of
  5216.              the file while you're testing it, or use SETDOS /V2 to force
  5217.              ECHO on even if an ECHO OFF command is used in the batch file.
  5218.              This will give you a picture of what is happening as the file
  5219.              is executed.  It will make your output look messy of course,
  5220.              so just turn it off once things are working.  You can also
  5221.              turn ECHO on at the beginning of a group of commands you want
  5222.              to "watch", and off at the end, just by adding ECHO commands
  5223.              at the appropriate spots in your file.
  5224.  
  5225.              You can also use the SETDOS /Y1 command to single step through
  5226.              all or part of a batch file (see page 313).  Insert the
  5227.              command at the beginning of the portion of the batch file that
  5228.              you wish to single-step through, and add a SETDOS /Y0 command
  5229.              at the end of the section.  After 4DOS, 4OS2, or 4DOS/NT
  5230.              executes the SETDOS command, it will display each command
  5231.              before it is executed, followed by a Y/N/R prompt.  Press Y to
  5232.              execute the command, N to skip the command and go on to the
  5233.              next, or R to execute the remainder of the batch file up to
  5234.              the next SETDOS /Y1 command without further prompting.  You
  5235.              can also press Ctrl-C or Ctrl-Break at the Y/N/R prompt to
  5236.              halt execution of the remainder of the batch file and return
  5237.              to the command processor prompt.
  5238.  
  5239.              Another trick is to insert PAUSE commands wherever you need
  5240.              them in order to be able to watch what's happening.  For
  5241.              complex debugging, you can make an alias that uses INKEY for a
  5242.              similar purpose, but helps you out a little more.  For example
  5243.  
  5244.  
  5245.         -------------------------------------------------------------------
  5246.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 86
  5247.  
  5248.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5249.         -------------------------------------------------------------------
  5250.  
  5251.              (enter this on one line, and use an ampersand [&] as the
  5252.              command separator if you are using 4OS2 or 4DOS/NT):
  5253.  
  5254.                   alias step `set skey=^ inkey Step:  %%skey ^ iff
  5255.                   "%skey"=="S" then ^ set /P ^ elseiff "%skey"=="X"
  5256.                   then ^ quit ^ endiff`
  5257.  
  5258.              Now anywhere you insert a STEP command in your file you'll get
  5259.              the Step: prompt during execution.  At that point you can type
  5260.              S to do a SET /P and display the current contents of your
  5261.              environment variables, X to exit the batch file, and any other
  5262.              key to go on.  (Of course you may need to modify this alias to
  5263.              fit your particular needs.)
  5264.  
  5265.              If you can't figure out how your aliases and variables are
  5266.              expanded, try turning LOG on at the start of the batch file.
  5267.              LOG keeps track of all commands after alias and variable
  5268.              expansion are completed, and gives you a record in a file that
  5269.              you can examine after the batch file is done.  If you simply
  5270.              want to see a record of what commands are executed, without
  5271.              the expansion, use LOG /H.
  5272.  
  5273.              You may also want to consider using redirection to capture
  5274.              your batch file output.  Simply type the batch file name
  5275.              followed by the redirection symbols, for example:
  5276.  
  5277.                   c:\> mybatch >& testout
  5278.  
  5279.              This records all batch file output, including error messages,
  5280.              in the file TESTOUT, so you can go back and examine it.  If
  5281.              you have ECHO ON in the batch file you'll get the batch
  5282.              commands intermingled with the output, which can provide a
  5283.              very useful trace of what's happening.  Of course, output from
  5284.              full-screen commands and programs that don't write to the
  5285.              standard output devices can't be recorded, but you can still
  5286.              gain a lot of useful information if your batch file does much
  5287.              output.
  5288.  
  5289.              If you're using redirection to see the output, remember that
  5290.              any prompts for input will probably go to the output file and
  5291.              not to the screen, so you need to know in advance the sequence
  5292.              of keystrokes required to get through the entire batch file,
  5293.              and enter them by hand or with KEYSTACK.  (As an example, the
  5294.              raw text for the Guided Tour distributed with new copies of
  5295.              4DOS, 4OS2, and 4DOS/NT was created by writing a 4DOS batch
  5296.              file containing the demonstration commands, testing it to get
  5297.              the proper keystroke sequence, and executing a command which
  5298.              used KEYSTACK to send the keystrokes and redirected the batch
  5299.              file's output to a disk file.)
  5300.  
  5301.         -------------------------------------------------------------------
  5302.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 87
  5303.  
  5304.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5305.         -------------------------------------------------------------------
  5306.  
  5307.           ## Batch File String Processing
  5308.  
  5309.              As you gain experience with batch files, you're likely to find
  5310.              that you need to manipulate text strings.  You may need to
  5311.              prompt a user for a name or password, process a list of files,
  5312.              or find a name in a phone list.  All of these are examples of
  5313.              string processing - the manipulation of lines of readable
  5314.              text.
  5315.  
  5316.              4DOS, 4OS2, and 4DOS/NT include several features that make
  5317.              string processing easier.  For example, you can use the INKEY
  5318.              and INPUT commands for user input; the ECHO, SCREEN, SCRPUT,
  5319.              and VSCRPUT commands for output; and the FOR command or the
  5320.              @FILEREAD function to scan through the lines of a file.  In
  5321.              addition, variable functions offer a wide range of string
  5322.              handling capabilities (see page 105 for full details).
  5323.  
  5324.              For example, suppose you need a batch file that will prompt a
  5325.              user for a name, break the name into a first name and a last
  5326.              name, and then run a hypothetical LOGIN program.  LOGIN
  5327.              expects the syntax /F:first /L:last with both the first and
  5328.              last names in upper case and neither name longer than 8
  5329.              characters.  Here is one way to write such a program:
  5330.  
  5331.                   @echo off
  5332.                   setlocal
  5333.                   unalias *
  5334.                   input Enter your name (no initials):  %%name
  5335.  
  5336.                   set first=%@word[%name,0]
  5337.                   set flen=%@len[%first]
  5338.                   set last=%@word[%name,1]
  5339.                   set llen=%@len[%last]
  5340.  
  5341.                   iff %flen gt 8 .or. %llen gt 8
  5342.                      echo First or last name too long
  5343.                      quit
  5344.                   endiff
  5345.  
  5346.                   login /F:%@upper[%first] /L:%@upper[%last]
  5347.                   endlocal
  5348.  
  5349.              The SETLOCAL command at the beginning of this batch file saves
  5350.              the environment and aliases.  Then the UNALIAS * command
  5351.              removes any existing aliases so they won't interfere with the
  5352.              behavior of the commands in the remainder of the batch file
  5353.              (you can accomplish the same thing by using an asterisk [*] in
  5354.              front of each command).  The first block of lines ends with an
  5355.  
  5356.  
  5357.         -------------------------------------------------------------------
  5358.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 88
  5359.  
  5360.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5361.         -------------------------------------------------------------------
  5362.  
  5363.              INPUT command which asks the user to enter a name.  The user's
  5364.              input is stored in the environment variable NAME.
  5365.  
  5366.              The second block of lines extracts the user's first and last
  5367.              names from the NAME variable and calculates the length of
  5368.              each.  It stores the first and last name, along with the
  5369.              length of each, in additional environment variables.  Note
  5370.              that the @WORD function numbers the first word as 0, not as 1.
  5371.  
  5372.              The IFF command in the third block of lines tests the length
  5373.              of both the first and last names.  If either is longer than 8
  5374.              characters, the batch file displays an error message and ends.
  5375.              Finally, in the last block, the batch file executes the LOGIN
  5376.              program with the appropriate parameters, then uses the
  5377.              ENDLOCAL command to restore the original environment and alias
  5378.              list.  At the same time, ENDLOCAL discards the temporary
  5379.              variables that the batch file used (NAME, FIRST, FLEN, etc.).
  5380.  
  5381.              When you're processing strings, you also need to avoid some
  5382.              common traps.  The biggest one is handling special characters.
  5383.  
  5384.              Suppose you have a batch file with these two commands, which
  5385.              simply accept a string and display it:
  5386.  
  5387.                   input Enter a string:  %%str
  5388.                   echo %str
  5389.  
  5390.              Those lines look safe, but what happens if the user enters the
  5391.              string "some > none" (without the quotes).  After the string
  5392.              is placed in the variable STR, the second line becomes
  5393.  
  5394.                   echo some > none
  5395.  
  5396.              The ">" is a redirection symbol, so the line echoes the string
  5397.              "some" and redirects it to a file called NONE - probably not
  5398.              what you expected.  You could try using quotation marks (see
  5399.              page 118) to avoid this kind of problem, but that won't quite
  5400.              work.  If you use back-quotes (ECHO `%STR`), the command will
  5401.              echo the four-character string %STR.  Environment variable
  5402.              names are not expanded (replaced by their contents, see page
  5403.              116) when they are inside back-quotes.
  5404.  
  5405.              If you use double quotes (ECHO "%STR"), the string entered by
  5406.              the user will be displayed properly, and so will the quotation
  5407.              marks.  With double quotes, the output would look like this:
  5408.  
  5409.                   "some > none"
  5410.  
  5411.  
  5412.  
  5413.         -------------------------------------------------------------------
  5414.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 89
  5415.  
  5416.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5417.         -------------------------------------------------------------------
  5418.  
  5419.              As you can imagine, this kind of problem becomes much more
  5420.              difficult if you try to process text from a file.  Special
  5421.              characters in the text can cause all kinds of confusion in
  5422.              your batch files.  Text containing back-quotes, double quotes,
  5423.              or redirection symbols can be virtually impossible to handle
  5424.              correctly.
  5425.  
  5426.              One way to overcome these potential problems is to use the
  5427.              SETDOS /X command (see page 312) to temporarily disable
  5428.              redirection symbols and other special characters.  The two-
  5429.              line batch file above would be a lot more likely to produce
  5430.              the expected results if it were rewritten this way:
  5431.  
  5432.                   setdos /x-15678
  5433.                   input Enter a string:  %%str
  5434.                   echo %str
  5435.                   setdos /x0
  5436.  
  5437.              The first line turns off alias processing and disables several
  5438.              special symbols, including the command separator and all
  5439.              redirection symbols.  Once the string has been processed, the
  5440.              last line re-enables the features that were turned off in the
  5441.              first line.
  5442.  
  5443.              If you need advanced string processing capabilities beyond
  5444.              those provided by 4DOS, 4OS2, and 4DOS/NT, you may want to
  5445.              consider using the REXX language.  Our products support
  5446.              external REXX programs for this purpose; see page 92 for
  5447.              additional details.
  5448.  
  5449.  
  5450.           ## Batch File Compression
  5451.  
  5452.              You can compress your .BTM files with a program called
  5453.              BATCOMP.EXE, which is distributed with 4DOS, 4OS2, and
  5454.              4DOS/NT.  This program condenses batch files by about a third
  5455.              and makes them unreadable with the LIST command and similar
  5456.              utilities.  Compressed batch files run at approximately the
  5457.              same speed as regular .BTM files.
  5458.  
  5459.              You may want to consider compressing batch files if you need
  5460.              to distribute them to others and keep your original code
  5461.              secret or prevent your users from altering them.  You may also
  5462.              want to consider compressing batch files to save some disk
  5463.              space on the systems where the compressed files are used.
  5464.              (However, you will not save space if you keep your compressed
  5465.              batch files on a disk compressed with a program like DBLSPACE,
  5466.              Stacker, or SuperStor.)
  5467.  
  5468.  
  5469.         -------------------------------------------------------------------
  5470.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 90
  5471.  
  5472.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5473.         -------------------------------------------------------------------
  5474.  
  5475.              The full syntax for the batch compression program is
  5476.  
  5477.                   BATCOMP [/O] input file [output file]
  5478.  
  5479.              You must specify the full name of the input file, including
  5480.              its extension, on the BATCOMP command line.  If you do not
  5481.              specify the output file, BATCOMP will use the same base name
  5482.              as the input file and add a .BTM extension.  BATCOMP will also
  5483.              add a .BTM extension if you specify a base name for the output
  5484.              file without an extension.  For example, to compress
  5485.              MYBATCH.BAT and save the result as MYBATCH.BTM, you can use
  5486.              any of these three commands:
  5487.  
  5488.                   c:\> batcomp mybatch.bat
  5489.                   c:\> batcomp mybatch.bat mybatch
  5490.                   c:\> batcomp mybatch.bat mybatch.btm
  5491.  
  5492.              If the output file (MYBATCH.BTM in the examples above) already
  5493.              exists, BATCOMP will prompt you before overwriting the file.
  5494.              You can disable the prompt by including /O on the BATCOMP
  5495.              command line immediately before the input file name.  Even if
  5496.              you use the /O option, BATCOMP will not compress a file into
  5497.              itself.
  5498.  
  5499.              JP Software does not provide a decompression utility to
  5500.              uncompress batch files.  If you use BATCOMP.EXE, make sure
  5501.              that you also keep a copy of the original batch file for
  5502.              future inspection or modification.
  5503.  
  5504.              You can adopt one of two strategies for keeping track of your
  5505.              original source files and compressed batch files.  First, you
  5506.              may want to create the source files with a traditional .BAT or
  5507.              .CMD extension and reserve the .BTM extension for compressed
  5508.              batch files.  The advantage of this approach is that you can
  5509.              modify and test the uncompressed versions at any time,
  5510.              although they will run in the slower, traditional mode unless
  5511.              they begin with a LOADBTM command (see page 263).
  5512.  
  5513.              If you prefer, you can use a .BTM extension for both the
  5514.              source and compressed files.  In this case you will have to
  5515.              use a different base name for each file.  For example, you
  5516.              might use MYBATCHS.BTM for the source file and MYBATCH.BTM for
  5517.              the compressed file.  This may make it more difficult to keep
  5518.              track of the correspondence between the source file and the
  5519.              compressed file, but it allows both files to run automatically
  5520.              in the high-speed .BTM mode.
  5521.  
  5522.              Each of our command processors includes its own version of
  5523.              BATCOMP.EXE, set up to run under the corresponding operating
  5524.  
  5525.         -------------------------------------------------------------------
  5526.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 91
  5527.  
  5528.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5529.         -------------------------------------------------------------------
  5530.  
  5531.              system. However, the output produced by each program is the
  5532.              same, so a batch file compressed with any version of BATCOMP
  5533.              can be used with any JP Software command processor.
  5534.  
  5535.              If you plan to distribute batch files to users of different
  5536.              platforms, be sure to read the compatibility discussion on
  5537.              page 72.
  5538.  
  5539.  
  5540.           ## REXX Support
  5541.  
  5542.              REXX is a a powerful file and text processing language
  5543.              developed by IBM, and available on many PC and other
  5544.              platforms.  You can invoke REXX programs from 4DOS, 4OS2, or
  5545.              4DOS/NT.  REXX is an ideal extension to the 4DOS, 4OS2, and
  5546.              4DOS/NT batch language, especially if you need advanced string
  5547.              processing capabilities.
  5548.  
  5549.              The REXX language is not built into 4DOS, 4OS2, or 4DOS/NT.
  5550.              Under DOS and Windows NT, you must have a copy of Personal
  5551.              REXX from Quercus Systems in Saratoga, CA in order to use the
  5552.              REXX language.  Under IBM OS/2 1.3 and above you can use the
  5553.              built-in REXX language provided by IBM, or use Quercus's
  5554.              Personal REXX for OS/2.  (Personal REXX is available from JP
  5555.              Software or directly from Quercus Systems.)
  5556.  
  5557.      4DOS    Under 4DOS, REXX programs are stored in .REX files.  To enable
  5558.              REXX support you must install Personal REXX, and define an
  5559.              executable extension (see page 66) that tells 4DOS to load
  5560.              Personal REXX when you invoke a .REX file.  For example:
  5561.  
  5562.                   set .rex=c:\prexx\rexx.exe
  5563.  
  5564.      4OS2    Under 4OS2, REXX programs are stored in .CMD files.  4OS2
  5565.              checks to see if the first two characters on the first line of
  5566.              a .CMD file are [/*], the beginning of a REXX comment.  If so,
  5567.              it passes the file to OS/2's built-in REXX facility for
  5568.              processing.  If Personal REXX for OS/2 is installed, it
  5569.              automatically replaces OS/2's built-in REXX, and handles all
  5570.              REXX commands passed by 4OS2.
  5571.  
  5572.      4NT     Under 4DOS/NT, REXX programs may be stored in .CMD or .REX
  5573.              files.  4DOS/NT checks to see if the first two characters on
  5574.              the first line of a .CMD or .REX file are [/*].  If so, it
  5575.              passes the file to Personal REXX for Windows NT for
  5576.              processing.  You must have Personal REXX for Windows NT
  5577.              installed to enable 4DOS/NT's REXX support.
  5578.  
  5579.  
  5580.  
  5581.         -------------------------------------------------------------------
  5582.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 92
  5583.  
  5584.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5585.         -------------------------------------------------------------------
  5586.  
  5587.              Both Personal REXX and OS/2's built-in REXX extend the
  5588.              interface between REXX and the command processor by allowing
  5589.              you to invoke 4DOS, 4OS2, or 4DOS/NT commands from within a
  5590.              REXX program.  For details, or for more information on any
  5591.              aspect of REXX, see your Personal REXX or OS/2 REXX
  5592.              documentation.
  5593.  
  5594.  
  5595.      4OS2 ## EXTPROC Support
  5596.      4NT
  5597.              4OS2 and 4DOS/NT offer an external processor (EXTPROC) option
  5598.              for batch files that lets you define an external program to
  5599.              process a particular .CMD file.  To identify a .CMD file to be
  5600.              used with an external processor, place the string "EXTPROC" as
  5601.              the first word on the first line of the file, followed by the
  5602.              name of the external program that should be called.  The
  5603.              command processor will start the program and pass it the name
  5604.              of the .CMD file and any command-line arguments that were
  5605.              entered.
  5606.  
  5607.              For example, suppose GETDATA.CMD contains the following lines:
  5608.  
  5609.                   EXTPROC D:\DATAACQ\DATALOAD.EXE
  5610.                   OPEN PORT1
  5611.                   READ 4000
  5612.                   DISKWRITE D:\DATAACQ\PORT1\RAW
  5613.  
  5614.              Then if you entered the command:
  5615.  
  5616.                   [d:\dataacq] getdata /p17
  5617.  
  5618.              The command processor would read the GETDATA.CMD file,
  5619.              determine that it began with an EXTPROC command, read the name
  5620.              of the processor program, and then execute the command:
  5621.  
  5622.                   D:\DATAACQ\DATALOAD.EXE D:\DATAACQ\GETDATA.CMD /p17
  5623.  
  5624.              The hypothetical DATALOAD.EXE program would then be
  5625.              responsible for reopening the GETDATA.CMD file, ignoring the
  5626.              EXTPROC line at the start, and interpreting the other
  5627.              instructions in the file.  It would also have to respond
  5628.              appropriately to the command-line parameter entered (/p17).
  5629.  
  5630.              Do not try to use 4OS2 or 4DOS/NT as the external processor
  5631.              named on the EXTPROC line in the .CMD file.  They will
  5632.              interpret the EXTPROC line as a command to re-open themselves.
  5633.              The result will be an infinite loop that will continue until
  5634.              the computer runs out of resources and locks up.
  5635.  
  5636.  
  5637.         -------------------------------------------------------------------
  5638.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 93
  5639.  
  5640.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5641.         -------------------------------------------------------------------
  5642.  
  5643.         Using the Environment
  5644.  
  5645.              The environment is a collection of information about your
  5646.              computer that every program receives.  Each entry in the
  5647.              environment consists of a variable name, followed by an equal
  5648.              sign and a string of text.  You can automatically substitute
  5649.              the text for the variable name in any command.  To create the
  5650.              substitution, include a percent sign [%] and a variable name
  5651.              on the command line or in an alias or batch file.  For
  5652.              example, you can create a variable named BACKUP like this:
  5653.  
  5654.                   c:\> set BACKUP=*.bak;*.bk!;*.bk
  5655.  
  5656.              If you then type
  5657.  
  5658.                   c:\> del %BACKUP
  5659.  
  5660.              it is equivalent to the following command:
  5661.  
  5662.                   del *.bak;*.bk!;*.bk
  5663.  
  5664.          ##  The variable names you use this way may contain any alphabetic
  5665.              or numeric characters, the underscore character [_], and the
  5666.              dollar sign [$].  You can force acceptance of other characters
  5667.              by including the full variable name in square brackets, like
  5668.              this:  %[AB##2].  You can also "nest" environment variables
  5669.              using square brackets.  For example %[%var1] means "the
  5670.              contents of the variable whose name is stored in VAR1".  A
  5671.              variable referenced with this technique cannot contain more
  5672.              than 255 characters of information.  Nested variable expansion
  5673.              can be disabled with the SETDOS /X command (see page 312).
  5674.  
  5675.              In 4DOS, the size of the environment is specified by the
  5676.              Environment and EnvFree directives in 4DOS.INI (see page 126)
  5677.              or by the /E: startup switch (see the 4DOS Introduction and
  5678.              Installation Guide).  In 4OS2 and 4DOS/NT the size of the
  5679.              environment is set automatically.
  5680.  
  5681.          ##  Environment variables may contain alias names.  The command
  5682.              processor will substitute the variable value for the name,
  5683.              then check for any alias name which may have been included
  5684.              within the variable's value.  For example, the following
  5685.              commands would generate a 2-column directory of the .TXT
  5686.              files:
  5687.  
  5688.                   c:\> alias d2 dir /2
  5689.                   c:\> set cmd=d2
  5690.                   c:\> %cmd *.txt
  5691.  
  5692.  
  5693.         -------------------------------------------------------------------
  5694.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 94
  5695.  
  5696.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5697.         -------------------------------------------------------------------
  5698.  
  5699.          ##  The trailing percent sign that was traditionally required for
  5700.              environment variable names is not usually required in 4DOS,
  5701.              4OS2, or 4DOS/NT, which accept any character that cannot be
  5702.              part of a variable name as the terminator.  However, the
  5703.              trailing percent can be used to maintain compatibility.
  5704.  
  5705.              The trailing percent sign is needed if you want to join two
  5706.              variable values.  The following examples show the possible
  5707.              interactions between variables and literal strings.  First,
  5708.              create two environment variables called ONE and TWO this way:
  5709.  
  5710.                   c:\> set ONE=abcd
  5711.                   c:\> set TWO=efgh
  5712.  
  5713.              Now the following combinations produce the output text shown:
  5714.  
  5715.                   %ONE%TWO            abcdTWO   ("%ONE%" + "TWO")
  5716.                   %ONE%TWO%           abcdTWO   ("%ONE%" + "TWO%")
  5717.                   %ONE%%TWO           abcdefgh  ("%ONE%" + "%TWO")
  5718.                   %ONE%%TWO%          abcdefgh  ("%ONE%" + "%TWO%")
  5719.                   %ONE%[TWO]          abcd[TWO] ("%ONE%" + "[TWO]")
  5720.                   %ONE%[TWO]%         abcd[TWO] ("%ONE%" + "[TWO]%")
  5721.                   %[ONE]%TWO          abcdefgh  ("%[ONE]" + "%TWO")
  5722.                   %[ONE]%TWO%         abcdefgh  ("%[ONE]" + "%TWO%")
  5723.  
  5724.          ##  If you want to pass a percent sign to a command, or a string
  5725.              which includes a percent sign, you must use two percent signs
  5726.              in a row.  Otherwise, the single percent sign will be seen as
  5727.              the beginning of a variable name and will not be passed on to
  5728.              the command.  For example, to display the string "We're with
  5729.              you 100%" you would use the command:
  5730.  
  5731.                   echo We're with you 100%%
  5732.  
  5733.              You can also use back-quotes around the text, rather than a
  5734.              double percent sign.  See page 118 for details.
  5735.  
  5736.      4DOS    Each copy of the command processor maintains its own copy of
  5737.              the environment.  The copy of the environment maintained by
  5738.              the primary shell is called the master environment.  When
  5739.              using a secondary shell, 4DOS will allow you to access the
  5740.              master environment in the primary shell with the commands SET
  5741.              /M (page 305), UNSET /M (page 336), and ESET /M (page 218),
  5742.              and with the %@MASTER variable function (page 112).  Master
  5743.              environment access is not available in 4OS2 or 4DOS/NT.
  5744.  
  5745.  
  5746.  
  5747.  
  5748.  
  5749.         -------------------------------------------------------------------
  5750.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 95
  5751.  
  5752.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5753.         -------------------------------------------------------------------
  5754.  
  5755.              Configuration Variables
  5756.  
  5757.              The following environment variables have special meanings in
  5758.              4DOS, 4OS2, and 4DOS/NT.
  5759.  
  5760.                   CDPATH tells the command processor where to search for
  5761.                   directories specified by the CD, CDD, and PUSHD commands
  5762.                   and in automatic directory changes.  (_CDPATH can be used
  5763.                   as an alternative to CDPATH if you are using Microsoft
  5764.                   Bookshelf, which uses a CDPATH variable for its own
  5765.                   purposes.)  CDPATH is composed of a list of directories,
  5766.                   separated by semicolons [;].  See page 43 for more
  5767.                   information about using CDPATH.
  5768.  
  5769.                   CMDLINE is the fully expanded text of the currently
  5770.                   executing command line.  CMDLINE is set just before
  5771.                   invoking any .COM, .EXE, .BTM, .BAT, or .CMD file.  If a
  5772.                   command line is prefaced with an "@" to prevent echoing
  5773.                   (see page 37), it will not be put in CMDLINE, and any
  5774.                   previous CMDLINE variable will be removed from the
  5775.                   environment.  Under DOS, this allows you to squeeze out
  5776.                   the last few bytes of environment space before loading
  5777.                   TSRs by prefacing each TSR command with an "@".
  5778.  
  5779.                   COLORDIR controls directory display colors used by DIR
  5780.                   and SELECT.  See page 30 for a complete description of
  5781.                   the format of this variable.
  5782.  
  5783.                   COMSPEC contains the full path and name of the command
  5784.                   processor.  COMSPEC is most commonly used by applications
  5785.                   which have a "shell to the command prompt" feature.  For
  5786.                   details on how COMSPEC is set and used, see your
  5787.                   Introduction and Installation Guide.
  5788.  
  5789.                   DIRCMD  is used by some versions of COMMAND.COM and
  5790.                   CMD.EXE to hold default options for the DIR command.
  5791.                   4DOS and its cousins do not support this variable, but
  5792.                   you can achieve the same effect with an alias.  For
  5793.                   example, if you want the DIR command to default to a 2-
  5794.                   column display with a vertical sort and a pause at the
  5795.                   end of each page, you could use this alias:
  5796.  
  5797.                        c:\> alias dir = `*dir /2/p/v`
  5798.  
  5799.                   If you wish to continue to use DIRCMD for compatibility
  5800.                   with systems that do not use 4DOS, you can define the
  5801.                   alias this way:
  5802.  
  5803.                        c:\> alias dir = `*dir %dircmd`
  5804.  
  5805.         -------------------------------------------------------------------
  5806.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 96
  5807.  
  5808.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5809.         -------------------------------------------------------------------
  5810.  
  5811.                   PATH is a list of directories that 4DOS, 4OS2, or 4DOS/NT
  5812.                   will search for executable files that aren't in the
  5813.                   current directory.  PATH may also be used by some
  5814.                   application programs to find their own files.  See page
  5815.                   20 and the PATH command on page 276 for a full
  5816.                   description of this variable.
  5817.  
  5818.                   PROMPT defines the command-line prompt.  It can be set or
  5819.                   changed with the PROMPT command (see page 281).
  5820.  
  5821.      4DOS         TEMP specifies the directory where 4DOS should store
  5822.                   temporary pipe files if the TEMP4DOS variable doesn't
  5823.                   exist.  Some other programs also use TEMP to define where
  5824.                   they should place their temporary files.  Temporary pipe
  5825.                   files are not used in 4OS2 and 4DOS/NT.
  5826.  
  5827.      4DOS         TEMP4DOS specifies where 4DOS should store temporary pipe
  5828.                   files.  Temporary pipe files are not used in 4OS2 and
  5829.                   4DOS/NT.
  5830.  
  5831.      4NT     In addition, 4DOS/NT uses the environment to keep track of the
  5832.              default directory on each drive or hard disk volume.  DOS and
  5833.              OS/2 keep track of the default directory for each drive letter
  5834.              internally; Windows NT does not.  4DOS/NT overcomes this
  5835.              incompatibility by saving the default directory for each drive
  5836.              in the environment, using variable names that cannot be
  5837.              accessed by the user.  Each variable begins with an equal sign
  5838.              followed by the drive letter and a colon (for example, =C:).
  5839.              You can view these variables with the SET command, but you
  5840.              cannot change them with any of the commands in 4DOS/NT.
  5841.  
  5842.  
  5843.           ## Internal Variables
  5844.  
  5845.              Internal variables are special environment variables built
  5846.              into 4DOS, 4OS2, and 4DOS/NT to provide information about your
  5847.              system.  They are not actually stored in the environment, but
  5848.              can be used in commands, aliases, and batch files just like
  5849.              any other environment variable.  The values of these variables
  5850.              are stored internally in the command processor, and cannot be
  5851.              changed with the SET, UNSET, or ESET command.  However, you
  5852.              can override any of these variables by defining a new variable
  5853.              with the same name.
  5854.  
  5855.              These internal variables are often used in batch files and
  5856.              aliases to examine system resources and adjust to the current
  5857.              computer settings.  You can examine the contents of any
  5858.              internal variable (except %= or %+) from the command line with
  5859.              a command like this:
  5860.  
  5861.         -------------------------------------------------------------------
  5862.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 97
  5863.  
  5864.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5865.         -------------------------------------------------------------------
  5866.  
  5867.                   c:\> echo %variablename
  5868.  
  5869.              The variables are listed below.  The first list is by
  5870.              category, to assist you in locating the information you want
  5871.              quickly.  The second list includes all the variables in
  5872.              alphabetical order, and defines the meaning of each one.
  5873.  
  5874.  
  5875.              Internal Variable Categories
  5876.  
  5877.              Hardware status:
  5878.  
  5879.                _APMAC         _APMBATT       _APMLIFE       _CPU
  5880.                _MONITOR       _NDP           _VIDEO
  5881.  
  5882.              Operating system and software status:
  5883.  
  5884.                _ANSI          _BOOT          _CODEPAGE      _COUNTRY
  5885.                _DOS           _DOSVER        _DV            _MOUSE
  5886.                _WIN           _WINDIR        _WINSYSDIR     _WINVER
  5887.  
  5888.              Command processor status:
  5889.  
  5890.                _4VER          _ALIAS         _BATCH         _ENV
  5891.                _HLOGFILE      _KSTACK        _LOGFILE       _PID
  5892.                _PPID          _PTYPE         _SHELL         _SID
  5893.                _SWAPPING      _TRANSIENT     _WINTITLE
  5894.  
  5895.              Screen and color:
  5896.  
  5897.                _BG            _COLUMN        _COLUMNS       _FG
  5898.                _ROW           _ROWS
  5899.  
  5900.              Drives and directories:
  5901.  
  5902.                _CWD           _CWDS          _CWP           _CWPS
  5903.                _DISK          _LASTDISK
  5904.  
  5905.              Dates and times:
  5906.  
  5907.                _DATE          _DAY           _DOW           _DOY
  5908.                _HOUR          _MINUTE        _MONTH         _SECOND
  5909.                _TIME          _YEAR
  5910.  
  5911.              Error codes:
  5912.  
  5913.                ?              ??             _?             _SYSERR
  5914.  
  5915.  
  5916.  
  5917.         -------------------------------------------------------------------
  5918.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 98
  5919.  
  5920.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5921.         -------------------------------------------------------------------
  5922.  
  5923.              Compatibility:
  5924.  
  5925.                =              +
  5926.  
  5927.  
  5928.              Internal Variable Details
  5929.  
  5930.              (In the list below the possible values for most variables are
  5931.              shown in double quotes for ease of understanding.  The actual
  5932.              values returned by the variables do not include the double
  5933.              quotes.)
  5934.  
  5935.              ? contains the exit code of the last external command.  Many
  5936.              programs return a "0" to indicate success and a non-zero value
  5937.              to signal an error.  However, not all programs return an exit
  5938.              code.  If no explicit exit code is returned, the value of %?
  5939.              is undefined.
  5940.  
  5941.      4DOS    ?? returns a code which explains how the last program
  5942.              terminated:
  5943.  
  5944.                   0 - program terminated normally.
  5945.                   1 - program terminated by Ctrl-C or Ctrl-Break.
  5946.                   2 - program terminated due to a critical error.
  5947.                   3 - program terminated and stayed resident in memory
  5948.                          (TSR).
  5949.  
  5950.              _? contains the exit code of the last internal command.  It is
  5951.              set to "0" if the command was successful, "1" if a usage error
  5952.              occurred, "2" if another command processor error or an
  5953.              operating system error occurred, or "3" if the command was
  5954.              interrupted by Ctrl-C or Ctrl-Break.  You must use or save
  5955.              this value immediately, because it is set by every internal
  5956.              command.
  5957.  
  5958.              = returns the current escape character.  Use this variable,
  5959.              instead of the actual escape character, if you want your batch
  5960.              files and aliases to work regardless of how the escape
  5961.              character is defined.  For example, if the escape character is
  5962.              a caret [^] (the default in 4OS2 and 4DOS/NT), both of the
  5963.              commands below will send a form feed to the printer.  However,
  5964.              if the escape character has been changed,  the first command
  5965.              will send the string "^f" to the printer, while the second
  5966.              command will continue to work as intended.
  5967.  
  5968.                   echos ^f > prn
  5969.                   echos %=f > prn
  5970.  
  5971.  
  5972.  
  5973.         -------------------------------------------------------------------
  5974.         Copr. 1993, JP Software Inc.     4DOS, 4OS2, 4DOS/NT Reference / 99
  5975.  
  5976.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  5977.         -------------------------------------------------------------------
  5978.  
  5979.              + returns the current command separator.  Use this variable,
  5980.              instead of the actual command separator, if you want your
  5981.              batch files and aliases to work regardless of how the command
  5982.              separator is defined.  For example, if the command separator
  5983.              is an ampersand [&] (the default in 4OS2 and 4DOS/NT), both of
  5984.              the commands below will display "Hello" on one line and
  5985.              "world" on the next.  However, if the command separator has
  5986.              been changed the first command will display "Hello & echo
  5987.              world", while the second command will continue to work as
  5988.              intended.
  5989.  
  5990.                   echo Hello & echo world
  5991.                   echo Hello %+ echo world
  5992.  
  5993.              _4VER is the current 4DOS, 4OS2, or 4DOS/NT version (for
  5994.              example, "5.0").
  5995.  
  5996.      4DOS    _ALIAS contains the free space in the alias list, in bytes.
  5997.  
  5998.              _ANSI contains "1" if internal flags indicate that ANSI.SYS or
  5999.              a compatible driver is installed; "0" if not.
  6000.  
  6001.      4OS2    4OS2 always enables OS/2's ANSI support, and assumes that it
  6002.              remains enabled.  Therefore _ANSI always returns "1" in 4OS2.
  6003.  
  6004.      4NT     Under 4DOS/NT, _ANSI always returns "0", because there is no
  6005.              ANSI support in Windows NT.
  6006.  
  6007.      4DOS    In 4DOS, the internal flags which determine the value of _ANSI
  6008.              depend on the SETDOS /A option (see page 309) and the ANSI
  6009.              directive in 4DOS.INI (see page 131), as shown in the table
  6010.              below.  If SETDOS /A is 0 or ANSI is set to Auto, 4DOS tests
  6011.              for the presence of an ANSI driver.  In this case you may need
  6012.              to experiment to see if this variable works properly with your
  6013.              particular driver, because there is no standard and 100%
  6014.              reliable way to detect an ANSI driver.  See page 24 for more
  6015.              information on ANSI drivers.
  6016.  
  6017.                   SETDOS /A        ANSI Directive _ANSI Value
  6018.  
  6019.                        0 (default) Auto (default) Result of test
  6020.                        1           Yes            1
  6021.                        2           No             0
  6022.  
  6023.      4DOS    _APMAC is the Advanced Power Management AC line status ("on",
  6024.              "off", or "unknown").  An empty string is returned if APM is
  6025.              not installed on your system.  (See the Glossary on page 368
  6026.              for a short description of APM.)
  6027.  
  6028.  
  6029.         -------------------------------------------------------------------
  6030.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 100
  6031.  
  6032.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6033.         -------------------------------------------------------------------
  6034.  
  6035.      4DOS    _APMBATT is the Advanced Power Management battery status
  6036.              ("high", "low", "critical", "charging", or "unknown").  An
  6037.              empty string is returned if APM is not installed.
  6038.  
  6039.      4DOS    _APMLIFE is the Advanced Power Management remaining battery
  6040.              life (0 - 100 or "unknown").  An empty string is returned if
  6041.              APM is not installed.
  6042.  
  6043.              _BATCH is the current batch nesting level.  It is "0" if no
  6044.              batch file is currently being processed.
  6045.  
  6046.              _BG is a string containing the first three characters of the
  6047.              screen background color at the current cursor location (for
  6048.              example, "Bla").
  6049.  
  6050.              _BOOT is the boot drive letter, without a colon.
  6051.  
  6052.              _CODEPAGE is the current code page number (see CHCP on page
  6053.              178).
  6054.  
  6055.              _COLUMN is the current cursor column (for example, "0" for the
  6056.              left side of the screen).
  6057.  
  6058.              _COLUMNS is the current number of screen columns (for example,
  6059.              "80").
  6060.  
  6061.              _COUNTRY is the current country code.
  6062.  
  6063.              _CPU is the CPU type:
  6064.  
  6065.                   86    8086 and 8088           386   i386
  6066.                   186   80186 and 80188         486   i486
  6067.                   200   NEC V20 and V30         586   Pentium
  6068.                   286   80286
  6069.  
  6070.              _CWD is the current working directory in the format
  6071.              d:\pathname.
  6072.  
  6073.              _CWDS has the same value as CWD, except it ends the pathname
  6074.              with a backslash [\].
  6075.  
  6076.              _CWP is the current working directory in the format \pathname.
  6077.  
  6078.              _CWPS has the same value as CWP, except it ends the pathname
  6079.              with a backslash [\].
  6080.  
  6081.              _DATE contains the current system date, in the format mm-dd-yy
  6082.              (U.S.), dd-mm-yy (Europe), or yy-mm-dd (Japan).
  6083.  
  6084.  
  6085.         -------------------------------------------------------------------
  6086.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 101
  6087.  
  6088.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6089.         -------------------------------------------------------------------
  6090.  
  6091.              _DAY is the day of the month (1 to 31).
  6092.  
  6093.              _DISK is the current disk drive, without a colon (for example,
  6094.              "C").
  6095.  
  6096.              _DOS is the operating system type ("DOS", "OS2", or "NT").
  6097.              4DOS always returns "DOS", 4OS2 always returns "OS2", and
  6098.              4DOS/NT always returns "NT".  This may be useful if you have
  6099.              batch files running under more than one operating system.
  6100.  
  6101.              _DOSVER is the current operating system version (for example,
  6102.              "6.0").  When running 4DOS in an OS/2 DOS session the version
  6103.              number will be 10.3 for OS/2 1.3, 20.1 for OS/2 2.1, and so
  6104.              on.
  6105.  
  6106.              _DOW is the first three characters of the current day of the
  6107.              week ("Mon", "Tue", "Wed", etc.).
  6108.  
  6109.              _DOY is the day of the year (1 to 366).
  6110.  
  6111.      4DOS    _DV is "1" if DESQview is loaded or "0" otherwise.
  6112.  
  6113.      4DOS    _ENV is the free space in the environment, in bytes.
  6114.  
  6115.              _FG is a string containing the first three letters of the
  6116.              screen foreground color at the current cursor position (for
  6117.              example, "Whi").
  6118.  
  6119.              _HLOGFILE  returns the name of the current history log file
  6120.              (or an empty string if LOG /H is OFF).
  6121.  
  6122.              _HOUR is the current hour (0 - 23).
  6123.  
  6124.      4DOS    _KSTACK returns "1" if KSTACK.COM is loaded or "0" otherwise.
  6125.  
  6126.              _LASTDISK is the last valid drive letter, without a colon.
  6127.  
  6128.              _LOGFILE  returns the name of the current log file (or an
  6129.              empty string if LOG is OFF).
  6130.  
  6131.              _MINUTE is the current minute (0 - 59).
  6132.  
  6133.      4DOS,   _MONITOR is the monitor type ("mono" or "color").
  6134.      4OS2
  6135.  
  6136.              _MONTH is the month of the year (1 to 12).
  6137.  
  6138.              _MOUSE is "1" if a mouse driver is loaded, and "0" otherwise.
  6139.  
  6140.  
  6141.         -------------------------------------------------------------------
  6142.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 102
  6143.  
  6144.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6145.         -------------------------------------------------------------------
  6146.  
  6147.              _NDP is the coprocessor type:
  6148.  
  6149.                   0     no coprocessor is installed
  6150.                   87    8087
  6151.                   287   80287
  6152.                   387   80387, 80486DX, or Pentium
  6153.  
  6154.      4OS2    _PID is the current process ID number.
  6155.  
  6156.      4OS2    _PPID is the process ID number of the parent process.
  6157.  
  6158.      4OS2    _PTYPE is the current OS/2 process type:
  6159.  
  6160.                   AVIO      Character mode, windowed
  6161.                   DT        Detached (no screen in use)
  6162.                   FS        Character mode, full-screen
  6163.                   PM        Presentation Manager
  6164.  
  6165.              _ROW is the current cursor row (for example, "0" for the top
  6166.              of the screen).
  6167.  
  6168.              _ROWS is the current number of screen rows (for example,
  6169.              "25").
  6170.  
  6171.              _SECOND is the current second (0 - 59).
  6172.  
  6173.              _SHELL is the current shell nesting level.  The primary shell
  6174.              is level "0", and each subsequent secondary shell increments
  6175.              the level by 1.
  6176.  
  6177.      4OS2    _SID is the session ID number.
  6178.  
  6179.      4DOS    _SWAPPING returns the current swapping state.  The return
  6180.              value is "OFF" if swapping has been disabled with the SWAPPING
  6181.              command, "EMS" if expanded memory is being used, "XMS" if
  6182.              extended memory is being used, or "Disk" if 4DOS is using disk
  6183.              swapping.  The return value is "None" if swapping has been
  6184.              disabled with the 4DOS.INI Swapping directive or if 4DOS
  6185.              failed to initiate memory or disk swapping during
  6186.              initialization.
  6187.  
  6188.              _SYSERR is the error code of the last operating system error.
  6189.              You will need a technical or programmer's manual to understand
  6190.              these error values.
  6191.  
  6192.              _TIME contains the current system time in the format hh:mm:ss.
  6193.              The separator character may vary depending upon your country
  6194.              information.
  6195.  
  6196.  
  6197.         -------------------------------------------------------------------
  6198.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 103
  6199.  
  6200.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6201.         -------------------------------------------------------------------
  6202.  
  6203.              _TRANSIENT is "1" if the current shell is transient (started
  6204.              with a /C, see your Introduction and Installation Guide for
  6205.              details), or "0" otherwise.
  6206.  
  6207.      4DOS,   _VIDEO is the video card type ("mono", "cga", "ega", or
  6208.      4OS2    "vga").
  6209.  
  6210.      4DOS    _WIN is the current Microsoft Windows mode.  This variable
  6211.              will always be zero except when 4DOS is running under
  6212.              Microsoft Windows:
  6213.  
  6214.                   0      Windows is not running
  6215.                   1      Windows 2
  6216.                   2      Windows 3 in 386 enhanced mode
  6217.                   3      Windows 3 in real or standard mode
  6218.  
  6219.      4NT     _WINDIR returns the name of the Windows NT directory.
  6220.  
  6221.      4NT     _WINSYSDIR returns the name of the Windows NT system
  6222.              directory.
  6223.  
  6224.              _WINTITLE returns the title of the current window.  This
  6225.              variable is valid in 4OS2 and 4DOS/NT, and in 4DOS when it is
  6226.              running in a DOS session under OS/2.  If you are using 4DOS
  6227.              running under DOS or DOS plus Windows, the return value is an
  6228.              empty string.
  6229.  
  6230.      4NT     _WINVER returns the current Windows NT version number.
  6231.  
  6232.              _YEAR is the current year (1980 to 2099).
  6233.  
  6234.              The _CWD, _CWDS, _CWP, _CWPS, and _DISK variables will return
  6235.              their result in upper or lower case depending on the value of
  6236.              the SETDOS /U switch (see page 312) or the UpperCase directive
  6237.              in the .INI file (see page 135).
  6238.  
  6239.              You can use these variables in a wide variety of ways
  6240.              depending on your needs.  Here are just a few examples.  Some
  6241.              of these examples rely on the IF command (page 238) or the IFF
  6242.              command (page 244) to test the value of a variable and perform
  6243.              different actions based on that value.
  6244.  
  6245.              In a 4DOS or 4OS2 batch file, set the color based on the video
  6246.              card type:
  6247.  
  6248.                   iff "%_video"=="mono" then
  6249.                     color bright white on black
  6250.                   else
  6251.                     color bright white on blue
  6252.  
  6253.         -------------------------------------------------------------------
  6254.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 104
  6255.  
  6256.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6257.         -------------------------------------------------------------------
  6258.  
  6259.                   endiff
  6260.  
  6261.              Call another batch file if 4DOS is running under DESQview:
  6262.  
  6263.                   if "%_dv" == "1" call dvstart
  6264.  
  6265.              Store the current date and time in a file, then save the
  6266.              output of a DIR command in the same file:
  6267.  
  6268.                   echo Directory as of %_date %_time > dirsave
  6269.                   dir >> dirsave
  6270.  
  6271.              Set up a prompt for the primary shell which displays the time
  6272.              and current directory, and a different one for secondary
  6273.              shells which includes the shell level rather than the time
  6274.              (see PROMPT on page 281 for details about setting the prompt).
  6275.              Also set different background colors for the two shells,
  6276.              without changing the foreground color.  You might use a
  6277.              sequence like this in your 4START file (see page 82):
  6278.  
  6279.                   iff %_shell==0 then
  6280.                     prompt $t $p$g
  6281.                     color %_fg on blue
  6282.                   else
  6283.                     prompt [$z] $p$g
  6284.                     color %_fg on cyan
  6285.                   endiff
  6286.  
  6287.  
  6288.           ## Variable Functions
  6289.  
  6290.              Variable functions are like internal variables, but they take
  6291.              one or more arguments (which can be environment variables or
  6292.              even other variable functions) and they return a value.
  6293.  
  6294.              Like all environment variables, these variable functions must
  6295.              be preceded by a percent sign in normal use (%@EVAL, %@LEN,
  6296.              etc.).  All variable functions must have square brackets
  6297.              enclosing their argument(s).  The argument(s) to a variable
  6298.              function cannot exceed 255 characters in length for all
  6299.              arguments taken as a group.
  6300.  
  6301.              The variable functions are useful in aliases and batch files
  6302.              to check on available system resources, manipulate strings and
  6303.              numbers, and work with filenames.
  6304.  
  6305.              Some variable functions, like @DISKFREE, are shown with
  6306.              "b|k|m" as one of their arguments.  Those functions return a
  6307.  
  6308.  
  6309.         -------------------------------------------------------------------
  6310.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 105
  6311.  
  6312.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6313.         -------------------------------------------------------------------
  6314.  
  6315.              number of bytes, kilobytes, or megabytes based on the "b|k|m"
  6316.              argument:
  6317.  
  6318.                   b      return the number of bytes
  6319.                   K      return the number of kilobytes (bytes / 1,024)
  6320.                   k      return the number of thousands of bytes (bytes /
  6321.                          1,000)
  6322.                   M      return the number of megabytes (bytes /
  6323.                          1,048,576)
  6324.                   m      return the number of millions of bytes (bytes /
  6325.                          1,000,000)
  6326.  
  6327.              You can include commas in the results from a "b|k|m" function
  6328.              by appending a "c" to the argument.  For example, to add
  6329.              commas to a "b" or number of bytes result, enter "bc" as the
  6330.              argument.
  6331.  
  6332.          !   In variable functions which take a drive letter as an
  6333.              argument, like @DISKFREE or @READY, the drive letter must be
  6334.              followed by a colon.  The function will not work properly if
  6335.              you use the drive letter without the colon.
  6336.  
  6337.          !   The @FILEREAD, @FILEWRITE, @FILESEEK, and @FILECLOSE functions
  6338.              allow you to access files based on their file handle.  These
  6339.              functions should only be used with file handles returned by
  6340.              @FILEOPEN!  If you use them with any other file handle you may
  6341.              damage other files opened by the command processor (or, in a
  6342.              secondary shell, the program which started the command
  6343.              processor), or hang your system.
  6344.  
  6345.              The functions are listed below.  The first list is by
  6346.              category, to assist you in locating the function you want
  6347.              quickly.  The second list includes all the functions in
  6348.              alphabetical order, and defines the arguments and return value
  6349.              for each one.
  6350.  
  6351.  
  6352.              Variable Function Categories
  6353.  
  6354.              System status:
  6355.  
  6356.                @DOSMEM        @EMS           @EXTENDED      @MASTER
  6357.                @READSCR       @XMS
  6358.  
  6359.              Drives and devices:
  6360.  
  6361.                @CDROM         @DEVICE        @DISKFREE      @DISKTOTAL
  6362.                @DISKUSED      @FSTYPE        @LABEL         @LPT
  6363.                @READY         @REMOTE        @REMOVABLE
  6364.  
  6365.         -------------------------------------------------------------------
  6366.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 106
  6367.  
  6368.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6369.         -------------------------------------------------------------------
  6370.  
  6371.              Files:
  6372.  
  6373.                @ATTRIB        @DESCRIPT      @EXETYPE       @FILEAGE
  6374.                @FILECLOSE     @FILEDATE      @FILEOPEN      @FILEREAD
  6375.                @FILES         @FILESEEK      @FILESIZE      @FILETIME
  6376.                @FILEWRITE     @FINDFIRST     @FINDNEXT      @LINE
  6377.                @LINES         @SEARCH        @TRUENAME      @UNIQUE
  6378.  
  6379.              File names:
  6380.  
  6381.                @EXT           @FILENAME      @FULL          @NAME
  6382.                @PATH
  6383.  
  6384.              Strings and characters:
  6385.  
  6386.                @ASCII         @CHAR          @INDEX         @INSTR
  6387.                @LEN           @LOWER         @REPEAT        @SUBSTR
  6388.                @TRIM          @UPPER         @WORD
  6389.  
  6390.              Numbers and arithmetic:
  6391.  
  6392.                @DEC           @EVAL          @INC           @INT
  6393.                @NUMERIC       @RANDOM
  6394.  
  6395.              Dates and times:
  6396.  
  6397.                @DATE          @MAKEDATE      @MAKETIME      @TIME
  6398.  
  6399.              Utility:
  6400.  
  6401.                @ALIAS         @SELECT        @EXEC
  6402.  
  6403.  
  6404.              Variable Function Details
  6405.  
  6406.              @ALIAS[name]:  Returns the contents of the specified alias as
  6407.              a string, or a null string if the alias doesn't exist.  When
  6408.              manipulating strings returned by @ALIAS you may need to
  6409.              disable certain special characters with the SETDOS /X command
  6410.              (see page 312).  Otherwise, command separators, redirection
  6411.              characters, and other similar "punctuation" in the alias may
  6412.              be interpreted as part of the current command, rather than
  6413.              part of a simple text string.
  6414.  
  6415.              @ASCII[c]:  Returns the numeric value of the specified ASCII
  6416.              character as a string.  For example %@ASCII[A] returns 65.
  6417.              You can put an escape character [-] before the actual
  6418.              character to process.  This allows quotes and other special
  6419.              characters as the argument (e.g., %@ASCII[-`]).
  6420.  
  6421.         -------------------------------------------------------------------
  6422.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 107
  6423.  
  6424.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6425.         -------------------------------------------------------------------
  6426.  
  6427.              @ATTRIB[filename,nrhsda]:  Returns a "1" if the specified file
  6428.              has the matching attribute(s); otherwise returns a "0".  The
  6429.              attributes are:
  6430.  
  6431.                   N      Normal (no attributes set)       S    System
  6432.                   R      Read-only                   D    Directory
  6433.                   H      Hidden                      A    Archive
  6434.  
  6435.              The attributes (other than N) can be combined (for example
  6436.              %@ATTRIB[MYFILE,HS]).  ATTRIB will only return a 1 if all of
  6437.              the attributes match.
  6438.  
  6439.              @CDROM[d:]:  Returns "1" if the drive is a CD-ROM or "0"
  6440.              otherwise.
  6441.  
  6442.              @CHAR[n]:  Returns the character corresponding to an ASCII
  6443.              numeric value.  For example %@CHAR[65] returns A.
  6444.  
  6445.              @DATE[mm-dd-yy]:  Returns the number of days since January 1,
  6446.              1980 for the specified date.  DATE uses the date format and
  6447.              separators mandated by your country code (for example dd.mm.yy
  6448.              in Germany, or  yy-mm-dd in Japan).
  6449.  
  6450.              @DEC[%var]:  Returns the same value as @EVAL[%var - 1].  That
  6451.              is, it retrieves and decrements the value of a variable.  The
  6452.              variable itself is not changed; to do so, use a command like
  6453.              this:
  6454.  
  6455.                   set var=%@dec[%var]
  6456.  
  6457.              @DESCRIPT[filename]:  Returns the file description for the
  6458.              specified filename (see the DESCRIBE command on page 193).
  6459.  
  6460.              @DEVICE[name]:  Returns "1" if the specified name is a
  6461.              character device (such as a printer or serial port), or "0" if
  6462.              not.
  6463.  
  6464.              @DISKFREE[d:,b|k|m]: Returns the amount of free disk space on
  6465.              the specified drive.
  6466.  
  6467.              @DISKTOTAL[d:,b|k|m]:  Returns the total disk space on the
  6468.              specified drive.
  6469.  
  6470.              @DISKUSED[d:,b|k|m]:  Returns the amount of disk space in use
  6471.              by files and directories on the specified drive.
  6472.  
  6473.              @DOSMEM[b|k|m]:  In 4DOS, returns the amount of free base
  6474.              memory.  In 4OS2, returns the size of the largest free memory
  6475.  
  6476.  
  6477.         -------------------------------------------------------------------
  6478.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 108
  6479.  
  6480.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6481.         -------------------------------------------------------------------
  6482.  
  6483.              block (either in physical or virtual memory).  In 4DOS/NT,
  6484.              returns the amount of free physical memory.
  6485.  
  6486.      4DOS    @EMS[b|k|m]:  Returns the amount of free EMS memory.
  6487.  
  6488.              @EVAL[expression]:  Evaluates an arithmetic expression.  @EVAL
  6489.              supports addition (+), subtraction (-), multiplication (*),
  6490.              division (/), and modulo (%%).  The expression can contain
  6491.              environment variables and other variable functions.  @EVAL
  6492.              also supports parentheses, commas, and decimals.  Parentheses
  6493.              can be nested.  The maximum precision is 16 digits to the left
  6494.              of the decimal point and 8 digits to the right of the decimal
  6495.              point.  @EVAL will strip leading and trailing zeros from the
  6496.              result.  When evaluating expressions, *, /, and %% take
  6497.              precedence over + and -.  For example, 3 + 4 * 2 will be
  6498.              interpreted as 3 + 8, not as 7 * 2.  To change this order of
  6499.              evaluation, use parentheses to specify the order you want.
  6500.              Also see @DEC and @INC.
  6501.  
  6502.              @EXEC[command]:  Execute the command.  The command can be an
  6503.              alias, internal command, external command, .BTM file, or .BAT
  6504.              file.  @EXEC is primarily intended for running a program from
  6505.              within the PROMPT.  It is a "back-door" entry into command
  6506.              processing and should be used with extreme caution.  Incorrect
  6507.              or recursive use of @EXEC may cause stack overflows or hang
  6508.              your system.
  6509.  
  6510.      4OS2    @EXETYPE[filename]:  Returns the application type as a string:
  6511.  
  6512.                   DOS       DOS .COM, .EXE, or .BAT file (OS/2 2.x only)
  6513.                   AVIO      OS/2 Character mode, windowed
  6514.                   FS        OS/2 Character mode, full-screen
  6515.                   PM        OS/2 Presentation Manager
  6516.                   WIN       Windows 3 (OS/2 2.x only)
  6517.                   UNKNOWN   Any other file
  6518.  
  6519.              @EXT[filename]:  Returns the extension from a file name,
  6520.              without a leading period.
  6521.  
  6522.      4DOS    @EXTENDED[b|k|m]:  Returns the amount of extended memory.
  6523.  
  6524.              @FILEAGE[filename]:  Returns the date and time of the file as
  6525.              a single numeric value.  The number can be used to compare the
  6526.              relative ages of two or more files.
  6527.  
  6528.              @FILECLOSE[n]:  Closes the file whose handle is "n."  You
  6529.              cannot close handles 0, 1 or 2.  Returns "0" if the file
  6530.              closed OK or "-1" if an error occurs.  Be sure to read the
  6531.              cautionary note about file functions on page 106.
  6532.  
  6533.         -------------------------------------------------------------------
  6534.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 109
  6535.  
  6536.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6537.         -------------------------------------------------------------------
  6538.  
  6539.              @FILEDATE[filename]:  Returns the date a file was last
  6540.              modified, in the default country format (mm-dd-yy for the US).
  6541.  
  6542.              @FILENAME[filename]:  Returns the name and extension of a
  6543.              file, without a path.
  6544.  
  6545.              @FILEOPEN[filename, read | write | append]:  Opens the file in
  6546.              the specified mode and returns the file handle as an integer.
  6547.              Returns "-1" if the file cannot be opened.  Be sure to read
  6548.              the cautionary note about file functions on page 106.
  6549.  
  6550.              @FILEREAD[n]:  Reads a line from the file whose handle is "n."
  6551.              Returns "**EOF**" if you attempt to read past the end of the
  6552.              file.  Be sure to read the cautionary note about file
  6553.              functions on page 106.
  6554.  
  6555.              @FILES[filename]:  Returns the number of files that match the
  6556.              filename specification, which may contain wildcards and
  6557.              include lists.  The filename must refer to a single directory;
  6558.              to check several directories, use @FILES once for each
  6559.              directory, and add the results together with @EVAL.
  6560.  
  6561.              @FILESEEK[n,offset,start]:  Moves the file pointer "offset"
  6562.              bytes in the file whose handle is "n".  Returns the new
  6563.              position of the pointer, in bytes from the start of the file.
  6564.              Set "start" to 0 to seek relative to the beginning of the
  6565.              file, 1 to seek relative to the current file pointer, or 2 to
  6566.              seek relative to the end of the file.  The offset value may be
  6567.              negative (seek backward), positive (seek forward), or zero
  6568.              (return current position, but do not change it).  Be sure to
  6569.              read the cautionary note about file functions on page 106.
  6570.  
  6571.              @FILESIZE[filename,b|k|m]:  Returns the size of a file, or
  6572.              "-1" if the file does not exist.  If the filename includes
  6573.              wildcards or an include list, returns the combined size of all
  6574.              matching files.
  6575.  
  6576.              @FILETIME[filename]:  Returns the time a file was last
  6577.              modified, in hh:mm format.
  6578.  
  6579.              @FILEWRITE[n,text]:  Writes a line to the file whose handle is
  6580.              "n".  Returns the number of bytes written, or "-1" if an error
  6581.              occurred.  Be sure to read the cautionary note about file
  6582.              functions on page 106.
  6583.  
  6584.              @FINDFIRST[filename [,nrhsda]]:  Returns the name of the first
  6585.              file that matches the filename, which may include wildcards.
  6586.              The second argument, if included, defines the attributes of
  6587.  
  6588.  
  6589.         -------------------------------------------------------------------
  6590.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 110
  6591.  
  6592.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6593.         -------------------------------------------------------------------
  6594.  
  6595.              the files that will be included in the search.  Returns an
  6596.              empty string if no files match.  The attributes are:
  6597.  
  6598.                   N      Normal (no attributes set)  S    System
  6599.                   R      Read-only                   D    Directory
  6600.                   H      Hidden                      A    Archive
  6601.  
  6602.              The attributes (other than N) can be combined (for example
  6603.              %@FINDFIRST[MYFILE,HS]).  @FINDFIRST will only find a file if
  6604.              all of the attributes match.
  6605.  
  6606.              @FINDNEXT[filename [,nrhsda]]:  Returns the name of the next
  6607.              file that matches the filename, which may include wildcards.
  6608.              The second argument, if included, defines the attributes of
  6609.              the files that will be included in the search (see @FINDFIRST
  6610.              for details).  Returns an empty string when no more files
  6611.              match.  @FINDNEXT should only be used after a successful call
  6612.              to @FINDFIRST.
  6613.  
  6614.      4OS2,   @FSTYPE[d:]:  Returns the file system type for the specified
  6615.      4NT     drive.  Under 4OS2, @FSTYPE will return "FAT" for a DOS-
  6616.              compatible drive with a file allocation table, "HPFS" for a
  6617.              drive that uses OS/2's high performance file system, or "CDFS"
  6618.              for a CD-ROM drive.  It may return other values if additional
  6619.              file systems have been installed with the IFS= directive in
  6620.              CONFIG.SYS.  4DOS/NT will normally return "FAT", "HPFS",
  6621.              "CDFS", or "NTFS" for a drive that uses the Windows NT file
  6622.              system.
  6623.  
  6624.              @FULL[filename]:  Returns the fully qualified path name of a
  6625.              file.
  6626.  
  6627.              @INC[%var]:  Returns the same value as %@EVAL[%var + 1].  That
  6628.              is, it retrieves and increments the value of a variable.  The
  6629.              variable itself is not changed; to do so, use a command like
  6630.              this:
  6631.  
  6632.                   set var=%@inc[%var]
  6633.  
  6634.              @INDEX[string1,string2]:  Returns the position of string2
  6635.              within string1, or "-1" if string2 is not found.  The first
  6636.              position in string1 is numbered 0.
  6637.  
  6638.              @INSTR[start, length, string]:  The same as @SUBSTR (see page
  6639.              113).  However, the string is at the end of the @INSTR
  6640.              argument list, so that commas in the string will not be
  6641.              confused with commas separating the arguments.
  6642.  
  6643.              @INT[n]:  Returns the integer part of the number n.
  6644.  
  6645.         -------------------------------------------------------------------
  6646.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 111
  6647.  
  6648.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6649.         -------------------------------------------------------------------
  6650.  
  6651.              @LABEL[d:]:  Returns the volume label of the specified disk
  6652.              drive.
  6653.  
  6654.              @LEN[string]:  Returns the length of a string.
  6655.  
  6656.              @LINE[filename,n]:  Returns line "n" from the specified file.
  6657.              The first line in the file is numbered 0.  "**EOF**" is
  6658.              returned for all line numbers beyond the end of the file.  If
  6659.              you need to scan through the lines of a file in sequence, the
  6660.              @FILEREAD function (above) and the "@filename" construct
  6661.              available in the FOR command (page 223) are much faster than
  6662.              calling the @LINE function repeatedly.  @LINE will retrieve
  6663.              input from standard input if you specify CON as the filename.
  6664.              If you are redirecting input to @LINE using this feature, you
  6665.              must use command grouping (see page 69) or the redirection
  6666.              will not work properly.  For example:
  6667.  
  6668.                   (echo %@line[con,0]) < myfile.dat
  6669.  
  6670.              @LINES[filename]:  Returns the line number of the last line in
  6671.              the file, or "-1" if the file is empty.  The first line in the
  6672.              file is numbered 0, so (for example) @LINES will return 0 for
  6673.              a file containing one line.
  6674.  
  6675.              @LOWER[string]:  Returns the string converted to lower case.
  6676.  
  6677.      4DOS    @LPT[n]:  Returns a "1" if the specified printer is ready;
  6678.              otherwise, returns "0".  n=1 checks the printer connected to
  6679.              LPT1, n=2 checks LPT2, and n=3 checks LPT3.
  6680.  
  6681.              @MAKEDATE[n]:  Returns a date (formatted according to the
  6682.              current country settings).  "n" is the number of days since
  6683.              1/1/80.  This is the inverse of @DATE.
  6684.  
  6685.              @MAKETIME[n]:  Returns a time (formatted according to the
  6686.              current country settings).  "n" is the number of seconds since
  6687.              midnight.  This is the inverse of @TIME.
  6688.  
  6689.      4DOS    @MASTER[varname]:  Returns the value of a variable from the
  6690.              master environment.
  6691.  
  6692.              @NAME[filename]:  Returns the base name of a file, without the
  6693.              path or extension.
  6694.  
  6695.              @NUMERIC[string]:  Returns "1" if the argument is composed
  6696.              entirely of digits (0 to 9), signs (+ or -), and the thousands
  6697.              and decimals separators.  Otherwise, returns "0".
  6698.  
  6699.  
  6700.  
  6701.         -------------------------------------------------------------------
  6702.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 112
  6703.  
  6704.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6705.         -------------------------------------------------------------------
  6706.  
  6707.              @PATH[filename]:  Returns the path from a file name, including
  6708.              the drive letter and a trailing backslash but not including
  6709.              the base name or extension.
  6710.  
  6711.              @RANDOM[min, max]:  Returns a random value between min and
  6712.              max, inclusive.  Min, max, and the returned value are all
  6713.              integers.
  6714.  
  6715.              @READSCR[row,col,length]:  Returns the text displayed on the
  6716.              screen at the specified location.  The upper left corner of
  6717.              the screen is location 0,0.
  6718.  
  6719.              @READY[d:]:  Returns "1" if the specified drive is ready;
  6720.              otherwise returns "0".
  6721.  
  6722.              @REMOTE[d:]:  Returns "1" if the specified drive is a remote
  6723.              (network) drive; otherwise returns "0".
  6724.  
  6725.              @REMOVABLE[d:]:  Returns "1" if the specified drive is
  6726.              removable (i.e., a floppy disk or removable hard disk);
  6727.              otherwise returns "0".
  6728.  
  6729.              @REPEAT[c,n]:  Returns the character "c" repeated "n" times.
  6730.  
  6731.              @SEARCH[filename]:  Searches for the filename using the PATH
  6732.              environment variable, appending an extension if one isn't
  6733.              specified.  See page 20 for details on the default extensions
  6734.              used when searching the PATH, and the order in which the
  6735.              search proceeds.  Returns the fully-expanded name of the file
  6736.              including drive, path, base name, and extension, or an empty
  6737.              string if a matching file is not found.  If wildcards are used
  6738.              in the filename, @SEARCH will search for the first file that
  6739.              matches the wildcard specification, and return the drive and
  6740.              path for that file plus the wildcard filename (e.g.,
  6741.              E:\UTIL\*.COM).
  6742.  
  6743.              @SELECT[filename,top,left,bottom,right,title]:  Pops up a
  6744.              selection window with the lines from the specified file.
  6745.              Returns the text of the line the scrollbar is on if you press
  6746.              Enter, or an empty string if you press Esc.  @SELECT can be
  6747.              used to display menus or other selection lists from a batch
  6748.              file.  To select from lines passed through input redirection
  6749.              or a pipe, use CON as the filename.  You can move through the
  6750.              selection window with standard navigation keystrokes.  To
  6751.              change the navigation keys, see page 140.
  6752.  
  6753.              @SUBSTR[string,start,length]:  Returns a substring, starting
  6754.              at the position "start" and continuing for "length"
  6755.              characters.  If the length is omitted, it will default to the
  6756.  
  6757.         -------------------------------------------------------------------
  6758.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 113
  6759.  
  6760.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6761.         -------------------------------------------------------------------
  6762.  
  6763.              remainder of the string.  If the length is negative, the start
  6764.              is relative to the right side of the string.  The first
  6765.              character in the string is numbered 0; if the length is
  6766.              negative, the last character is numbered 0.  For example,
  6767.              %@SUBSTR[%_TIME,0,2] gets the current time and extracts the
  6768.              hour.  If the string includes commas, it must be quoted with
  6769.              double quotes ["] or back-quotes [`].  The quotes do count in
  6770.              calculating the position of the substring.  @INSTR (page 111)
  6771.              performs the same function, and allows commas in the string
  6772.              without quoting.
  6773.  
  6774.              @TIME[hh:mm:ss]:  Returns the number of seconds since midnight
  6775.              for the specified time.  The time must be in 24-hour format;
  6776.              "am" and "pm" cannot be used.
  6777.  
  6778.              @TRIM[string]:  Returns the string with the leading and
  6779.              trailing white space (space and tab characters) removed.
  6780.  
  6781.      4DOS    @TRUENAME[filename]:  Returns the true, fully-expanded name
  6782.              for a file.  TRUENAME will "see through" a JOIN or SUBST, and
  6783.              requires DOS 3.0 or above.  Wildcards may not be used in the
  6784.              filename.  @TRUENAME can handle simple drive substitutions
  6785.              such as those created by JOIN, SUBST, or most network drive
  6786.              mappings.  However it may not be able to correctly determine
  6787.              the true name if you use "nested" JOIN or SUBST commands, or a
  6788.              network which does not report true names properly.
  6789.  
  6790.              @UNIQUE[d:\path]:  Creates a zero-length file with a unique
  6791.              name in the specified directory, and returns the full name and
  6792.              path.  If no path is specified, the file will be created in
  6793.              the current directory.  The file name will be FAT-compatible
  6794.              (8 character name and 3-character extension) regardless of
  6795.              whether the file is created on a FAT, HPFS, or NTFS drive.
  6796.              This function allows you to create a  temporary file without
  6797.              overwriting an existing file.
  6798.  
  6799.              @UPPER[string]:  Returns the string converted to upper case.
  6800.  
  6801.              @WORD[n,string]:  Returns the "nth" word in a string.  The
  6802.              first word is numbered 0.  If "n" is negative, words are
  6803.              returned from the end of the string.  Only spaces, tabs, and
  6804.              commas are considered to be word separators.  For example:
  6805.  
  6806.                   %@WORD[2,NOW IS THE TIME]     returns "THE"
  6807.                   %@WORD[-0,NOW IS THE TIME]    returns "TIME"
  6808.                   %@WORD[-2,NOW IS THE TIME]    returns "IS"
  6809.  
  6810.      4DOS    @XMS[b|k|m]:  Returns the amount of free XMS memory.
  6811.  
  6812.  
  6813.         -------------------------------------------------------------------
  6814.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 114
  6815.  
  6816.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6817.         -------------------------------------------------------------------
  6818.  
  6819.              Examples
  6820.  
  6821.              You can use variable functions in a wide variety of ways
  6822.              depending on your needs.  We've included a few examples below
  6823.              to give you an idea of what's possible.
  6824.  
  6825.              To set the prompt to show the amount of free memory (see the
  6826.              PROMPT command, page 281,  for details on including variable
  6827.              functions in your prompt):
  6828.  
  6829.                   c:\> prompt (%%@dosmem[K]K) $p$g
  6830.  
  6831.              Set up a simple command-line calculator.  The calculator is
  6832.              used with a command like CALC 3 * (4 + 5):
  6833.  
  6834.                   c:\> alias calc `echo The answer is:  %@eval[%&]`
  6835.  
  6836.              The following batch file uses variable functions to implement
  6837.              "once a day" execution of a group of commands.  It works by
  6838.              constructing a 6-digit number "yymmdd" from today's date, and
  6839.              comparing that to a number of the same type stored in the file
  6840.              C:\ONCEADAY.DAT.  If today's date is numerically larger than
  6841.              the saved date, and the time is after 6:00 AM, then the "once
  6842.              a day" commands are run, and today's date is saved in the file
  6843.              as the new date for comparison.  Otherwise, no action is
  6844.              taken.  You can make this file simpler using the %@DATE and
  6845.              %@TIME functions instead of using %@SUBSTR to extract
  6846.              substrings of the %_DATE and %_TIME variables; we used the
  6847.              approach shown to demonstrate the use of %@SUBSTR.
  6848.  
  6849.                   rem  Temporary variables used to shorten example lines:
  6850.                   rem    DD is _date, DY is yymmdd date, TM is _time
  6851.                   set dd=%_date
  6852.                   set
  6853.                   dy=%@substr[%dd,6,2]%@substr[%dd,0,2]%@substr[%dd,3,2]
  6854.                   set lastdate=0
  6855.                   iff exist c:\onceaday.dat then
  6856.                     set lastdate=%@line[onceaday.dat,0]
  6857.                   endiff
  6858.                   iff %dy gt %lastdate then
  6859.                     set tm=%_time
  6860.                     iff "%@substr[%tm,0,2]%@substr[%tm,3,2]" gt "0600" then
  6861.                       rem Commands to be executed once a day go here
  6862.                       echo %dy > c:\onceaday.dat
  6863.                     endiff
  6864.                   endiff
  6865.  
  6866.  
  6867.  
  6868.  
  6869.         -------------------------------------------------------------------
  6870.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 115
  6871.  
  6872.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6873.         -------------------------------------------------------------------
  6874.  
  6875.         Command Parsing
  6876.  
  6877.              Whenever you type something at the command line and press the
  6878.              Enter key, or include a command in a batch file, you have
  6879.              given a command to 4DOS, 4OS2, or 4DOS/NT, which must figure
  6880.              out how to execute your command.  If you understand the
  6881.              general process that is used, you will be able to make the
  6882.              best use of the commands.  Understanding these steps can be
  6883.              especially helpful when working with complex aliases or batch
  6884.              file commands.
  6885.  
  6886.              To decide what activity to perform, the command processor goes
  6887.              through several steps.  Before it starts, it writes the entire
  6888.              command line (which may contain multiple commands) to the
  6889.              history log file if history logging has been enabled with the
  6890.              LOG /H command (see page 264).  Then, if the line contains
  6891.              multiple commands, the first command is isolated for
  6892.              processing.
  6893.  
  6894.              4DOS, 4OS2, and 4DOS/NT begin by dividing the command into a
  6895.              command name and a command tail.  The command name is the
  6896.              first word in the command; the tail is everything that follows
  6897.              the command name.  For example, in the command line
  6898.  
  6899.                   dir *.txt /2/p/v
  6900.  
  6901.              the command name is "dir," and the command tail is " *.txt
  6902.              /2/p/v."
  6903.  
  6904.              Next the command processor tries to match the command name
  6905.              against its list of aliases.  If it finds a match between the
  6906.              command name and one of the aliases you've defined, it
  6907.              replaces the command name with the contents of the alias.
  6908.              (This substitution is done internally and is not normally
  6909.              visible to you).  If the alias included parameters (%1, %2,
  6910.              etc.), the parameter values are filled in from the text on the
  6911.              command line, and any parameters used in this process are
  6912.              removed from the command line.  The process of replacing a
  6913.              command name that refers to an alias with the contents of the
  6914.              alias, and filling in the alias parameters, is called alias
  6915.              expansion.
  6916.  
  6917.              This expansion of an alias creates a new command name:  the
  6918.              first word of the alias.  This new command name is again
  6919.              tested against the list of aliases, and if a match is found
  6920.              the contents of the new alias is expanded just like the first
  6921.              alias.  This process, called nested alias expansion, continues
  6922.              until the command name no longer refers to an alias.
  6923.  
  6924.  
  6925.         -------------------------------------------------------------------
  6926.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 116
  6927.  
  6928.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6929.         -------------------------------------------------------------------
  6930.  
  6931.              Once it has finished with the aliases, 4DOS, 4OS2, or 4DOS/NT
  6932.              next tries to match the command name with its list of internal
  6933.              commands.  If it is unsuccessful, the command processor knows
  6934.              that it will have to search for a batch file or external
  6935.              program to execute your command.
  6936.  
  6937.              The next step is to locate any batch file or alias parameters,
  6938.              environment variables, internal variables, or variable
  6939.              functions in the command, and replace each one with its value.
  6940.              This process is called variable expansion.
  6941.  
  6942.              The variable expansion process is modified for certain
  6943.              internal commands, like EXCEPT, IFF, and GLOBAL.  These
  6944.              commands are always followed by another command, so variable
  6945.              expansion takes place separately for the original command and
  6946.              the command that follows it.
  6947.  
  6948.              Once all of the aliases and environment variables have been
  6949.              expanded, 4DOS, 4OS2, or 4DOS/NT will echo the complete
  6950.              command to the screen (if command-line echo has been enabled)
  6951.              and write it to the log file (if command logging has been
  6952.              turned on).
  6953.  
  6954.              Before it can actually execute your command, the command
  6955.              processor must scan the command tail to see if it includes
  6956.              redirection or piping.  If so, the proper internal switches
  6957.              are set to send output to an alternate device or to a file,
  6958.              instead of to the screen.  In 4OS2 and 4DOS/NT, a second
  6959.              process is started at this point, if necessary, to receive any
  6960.              piped output.
  6961.  
  6962.              Finally, it is time to execute the command.  If the command
  6963.              name matches an internal command, 4DOS, 4OS2, or 4DOS/NT will
  6964.              perform the activities you have requested.  Otherwise, the
  6965.              command processor searches for an executable (.COM or .EXE)
  6966.              file, a batch file, or a file with an executable extension
  6967.              that matches the command name (see the detailed description of
  6968.              this search on page 20).
  6969.  
  6970.              Once the internal command or external program has terminated,
  6971.              the command processor saves the result or exit code that the
  6972.              command generated, cleans up any redirection that you
  6973.              specified, and then returns to the original command line to
  6974.              retrieve the next command.  When all of the commands in a
  6975.              command line are finished, the next line is read from the
  6976.              current batch file, or if no batch file is active, the prompt
  6977.              is displayed.
  6978.  
  6979.  
  6980.  
  6981.         -------------------------------------------------------------------
  6982.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 117
  6983.  
  6984.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  6985.         -------------------------------------------------------------------
  6986.  
  6987.              You can disable and re-enable several parts of command parsing
  6988.              (for example alias expansion, variable expansion, and
  6989.              redirection) with the SETDOS /X command (see page 312).
  6990.  
  6991.  
  6992.              Argument Quoting
  6993.  
  6994.              As it parses the command line, the command processor looks for
  6995.              command separators (carets [^] in 4DOS, or ampersands [&] in
  6996.              4OS2 and 4DOS/NT), conditional commands (|| or &&), white
  6997.              space (spaces, tabs, and commas), percent signs [%] which
  6998.              indicate variables to be expanded, and redirection and piping
  6999.              characters (>, <, or |).
  7000.  
  7001.              Normally, these special characters cannot be passed to a
  7002.              command as part of an argument.  However, you can include any
  7003.              of the special characters in an argument by enclosing the
  7004.              entire argument in back-quotes [`] or double quotes ["].
  7005.              Although both back-quotes and double quotes will let you build
  7006.              arguments that include special characters, they do not work
  7007.              the same way.
  7008.  
  7009.              No alias or variable expansion is performed on an argument
  7010.              enclosed in back-quotes.  Redirection symbols inside the back-
  7011.              quotes are ignored.  The back-quotes are removed from the
  7012.              command line before the command is executed.
  7013.  
  7014.              No alias expansion is performed on expressions enclosed in
  7015.              double quotes.  Redirection symbols inside double quotes are
  7016.              ignored.  However, variable expansion is performed on
  7017.              expressions inside double quotes.  The double quotes
  7018.              themselves will be passed to the command as part of the
  7019.              argument.
  7020.  
  7021.              For example, suppose you have a batch file CHKNAME.BTM which
  7022.              expects a name as its first parameter (%1).  Normally the name
  7023.              is a single word.  If you need to pass a two-word name with a
  7024.              space in it to this batch file you could use the command:
  7025.  
  7026.                   c:\> chkname `MY NAME`
  7027.  
  7028.              Inside the batch file, %1 will have the value MY NAME,
  7029.              including the space.  The back-quotes caused the command
  7030.              processor to pass the string to the batch file as a single
  7031.              argument.
  7032.  
  7033.              For a more complex example, suppose the batch file QUOTES.BAT
  7034.              contains the following commands:
  7035.  
  7036.  
  7037.         -------------------------------------------------------------------
  7038.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 118
  7039.  
  7040.                                         CHAPTER 4 / ALIASES AND BATCH FILES
  7041.         -------------------------------------------------------------------
  7042.  
  7043.                   @echo off
  7044.                   echo Arg1 = %1
  7045.                   echo Arg2 = %2
  7046.                   echo Arg3 = %3
  7047.  
  7048.              and that the environment variable FORVAR has been defined with
  7049.              this command:
  7050.  
  7051.                   c:\> set FORVAR=for
  7052.  
  7053.              Now, if you enter the command
  7054.  
  7055.                   c:\> quotes `Now is the time %forvar` all good
  7056.  
  7057.              the output from QUOTES.BAT will look like this:
  7058.  
  7059.                   Arg1 = Now is the time %forvar
  7060.                   Arg2 = all
  7061.                   Arg3 = good
  7062.  
  7063.              But if you enter the command
  7064.  
  7065.                   c:\> quotes "Now is the time %forvar" all good
  7066.  
  7067.              the output from QUOTES.BAT will look like this:
  7068.  
  7069.                   Arg1 = "Now is the time for"
  7070.                   Arg2 = all
  7071.                   Arg3 = good
  7072.  
  7073.              Notice that in both cases, the quotes keep characters together
  7074.              and reduce the number of arguments in the line.
  7075.  
  7076.              The following example has 7 command-line arguments, while the
  7077.              examples above only have 3:
  7078.  
  7079.                   c:\> quotes Now is the time %forvar all good
  7080.  
  7081.              When an alias is defined in a batch file or from the command
  7082.              line, its argument can be enclosed in back-quotes to prevent
  7083.              the expansion of replaceable parameters, variables, and
  7084.              multiple commands until the alias is invoked.  See ALIAS on
  7085.              page 155 for details.
  7086.  
  7087.              You can disable and re-enable back-quotes and double quotes
  7088.              with the SETDOS /X command (see page 312).
  7089.  
  7090.  
  7091.  
  7092.  
  7093.         -------------------------------------------------------------------
  7094.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 119
  7095.  
  7096.                                                   CHAPTER 5 / CONFIGURATION
  7097.         -------------------------------------------------------------------
  7098.  
  7099.  
  7100.         CHAPTER 5 / CONFIGURATION
  7101.  
  7102.  
  7103.         Part of the power of 4DOS, 4OS2, and 4DOS/NT is their flexibility.
  7104.         You can alter their configuration to match your style of computing.
  7105.         This chapter explains how to make the command processor work the
  7106.         way you want.
  7107.  
  7108.         The configuration of 4DOS, 4OS2, and 4DOS/NT is controlled through
  7109.         an optional file of initialization information with the extension
  7110.         .INI.  This file is called 4DOS.INI in 4DOS, 4OS2.INI in 4OS2, and
  7111.         4NT.INI in 4DOS/NT.  (For brevity, we refer to all three files as
  7112.         .INI files throughout this manual.)
  7113.  
  7114.         You can create, add to, and edit the .INI file with any ASCII text
  7115.         editor.  Each command processor reads its .INI file when it starts,
  7116.         and configures itself accordingly.  The .INI file is not re-read
  7117.         when you change it.  For changes to take effect, you must reboot
  7118.         your system (under DOS), or restart the session or window in which
  7119.         your command processor is running (under OS/2 or Windows NT).
  7120.  
  7121.         Each item that you can include in the .INI file has a default
  7122.         value.  You only need to include entries in the file for settings
  7123.         that you want to change from their default values.  If you are
  7124.         happy with all of the default values, you don't need an .INI file
  7125.         at all.
  7126.  
  7127.  
  7128.         Using the .INI File
  7129.  
  7130.              Some settings in the .INI file are initialized when you
  7131.              install 4DOS, 4OS2, or 4DOS/NT, so you may have an .INI file
  7132.              even if you didn't create one yourself.  You should not delete
  7133.              this file unless you've checked carefully to be sure that you
  7134.              don't need any of the settings the installation program put
  7135.              there.
  7136.  
  7137.              4DOS, 4OS2, and 4DOS/NT primary shells search for the .INI
  7138.              file in three places:
  7139.  
  7140.                   * If there is an "@d:\path\inifile" option on the SHELL=
  7141.                     line in CONFIG.SYS (for 4DOS) or on the startup
  7142.                     command line (for 4OS2 and 4DOS/NT), the command
  7143.                     processor will use the path and file name specified
  7144.                     there, and will not look elsewhere.
  7145.  
  7146.                   * If there is no .INI file name on the SHELL= line or
  7147.                     startup command line, the search proceeds to the same
  7148.  
  7149.         -------------------------------------------------------------------
  7150.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 120
  7151.  
  7152.                                                   CHAPTER 5 / CONFIGURATION
  7153.         -------------------------------------------------------------------
  7154.  
  7155.                     directory where the command processor program file
  7156.                     (4DOS.COM, 4OS2.EXE, or 4NT.EXE) is stored.  This is
  7157.                     the "normal" location for the .INI file.  4DOS, 4OS2,
  7158.                     and 4DOS/NT determine this directory automatically.
  7159.                     You can also set it yourself by placing a COMSPEC
  7160.                     directory name on the SHELL= line in CONFIG.SYS (for
  7161.                     4DOS), or on the startup command line (for 4OS2 and
  7162.                     4DOS/NT).  See your Introduction and Installation
  7163.                     Guide for further details on setting the COMSPEC
  7164.                     directory.
  7165.  
  7166.                   * If the .INI file is not found in the directory where
  7167.                     the program file is stored, a final check is made in
  7168.                     the root directory of the boot drive.
  7169.  
  7170.              When 4DOS, 4OS2, or 4DOS/NT is loaded as a secondary shell, it
  7171.              does not search for the .INI file.  Instead, it retrieves the
  7172.              primary shell's .INI file data, processes the [Secondary]
  7173.              section of the original .INI file if necessary, and then
  7174.              processes any "@d:\path\inifile" option on the secondary shell
  7175.              command line (see your Introduction and Installation Guide for
  7176.              details).  You can override this behavior with the NextINIFile
  7177.              directive (see page 142).
  7178.  
  7179.  
  7180.         .INI File Directives
  7181.  
  7182.              Most lines in the .INI file consist of a one-word directive,
  7183.              an equal sign [=], and a value.  For example, in the following
  7184.              line, the word "Environment" is the directive and "2048" is
  7185.              the value:
  7186.  
  7187.                   Environment = 2048
  7188.  
  7189.              Any spaces before or after the equal sign are ignored.
  7190.  
  7191.              If you have a long string to enter in the .INI file (for
  7192.              example, for the ColorDir directive), you must enter it all on
  7193.              one line.  Strings cannot be "continued" to a second line.
  7194.              Each line may be up to 511 characters long in 4DOS, or 1023
  7195.              characters long in 4OS2 and 4DOS/NT.
  7196.  
  7197.              The format of the value part of a directive line depends on
  7198.              the individual directive.  It may be a numeric value, a single
  7199.              character, a choice (like "Yes" or "No"), a color setting, a
  7200.              key name, a path, a filename, or a text string.  The value
  7201.              begins with the first non-blank character after the equal sign
  7202.              and ends at the end of the line or the beginning of a comment.
  7203.  
  7204.  
  7205.         -------------------------------------------------------------------
  7206.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 121
  7207.  
  7208.                                                   CHAPTER 5 / CONFIGURATION
  7209.         -------------------------------------------------------------------
  7210.  
  7211.              Blank lines are ignored in the .INI file and can be used to
  7212.              separate groups of directives.  You can place comments in the
  7213.              file by beginning a line with a semicolon [;].  You can also
  7214.              place comments at the end of any line except one containing a
  7215.              text string value.  To do so, enter at least one space or tab
  7216.              after the value, a semicolon, and your comment, like this:
  7217.  
  7218.                   Environment = 2048       ;set standard environment size
  7219.  
  7220.              If you try to place a comment at the end of a string value,
  7221.              the comment will become part of the string and will probably
  7222.              cause an error.
  7223.  
  7224.              When the command processor detects an error while processing
  7225.              the .INI file, it displays an error message and prompts you to
  7226.              press a key to continue processing the file.  This allows you
  7227.              to note any errors before the startup process continues.  The
  7228.              directive in error will retain its previous or default value.
  7229.              Only the most catastrophic errors (like a disk read failure)
  7230.              will terminate processing of the remainder of the .INI file.
  7231.              If you don't want a pause after each error, use a
  7232.              "PauseOnError = No" directive at the beginning of the .INI
  7233.              file.
  7234.  
  7235.              If you need to test different values for an .INI directive
  7236.              without repeatedly editing the .INI file, see the INIQuery
  7237.              directive on page 127.
  7238.  
  7239.              The .INI file has three sections:  the first or global
  7240.              section, the [Primary] section, and the [Secondary] section.
  7241.              The global section consists of directives at the beginning of
  7242.              the file, with no section name before them.  These directives
  7243.              are effective in all shells.  In most cases, this is the only
  7244.              section you will need, particularly for 4OS2 and 4DOS/NT.
  7245.  
  7246.              The [Primary] and [Secondary] sections include directives that
  7247.              are used only in primary and secondary shells respectively
  7248.              (see page 12 for more information on primary and secondary
  7249.              shells).  Each section is identified by the section name in
  7250.              square brackets on a line by itself.  You don't need to set up
  7251.              these sections unless you want different directives for
  7252.              primary and secondary shells.
  7253.  
  7254.              Directives in the [Primary] section are used for the first or
  7255.              primary shell.  The values are passed automatically to all
  7256.              secondary shells, unless overridden by a directive with the
  7257.              same name in the [Secondary] section.
  7258.  
  7259.  
  7260.  
  7261.         -------------------------------------------------------------------
  7262.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 122
  7263.  
  7264.                                                   CHAPTER 5 / CONFIGURATION
  7265.         -------------------------------------------------------------------
  7266.  
  7267.              Directives in the [Secondary] section are used in secondary
  7268.              shells only, and override any corresponding primary shell
  7269.              settings.  For example, these lines in the .INI file:
  7270.  
  7271.                        [Primary]
  7272.                        ScreenRows = 25
  7273.                        [Secondary]
  7274.                        ScreenRows = 50
  7275.  
  7276.              mean to assume that you have 25 rows on the screen in the
  7277.              primary shell and 50 lines in all secondary shells.
  7278.  
  7279.              Sections that begin with any name other than [Primary] or
  7280.              [Secondary] are ignored.
  7281.  
  7282.              The SETDOS command can override several of the .INI file
  7283.              directives (see page 308).  For example, the cursor shape used
  7284.              by 4DOS, 4OS2, and 4DOS/NT can be adjusted either with the
  7285.              CursorIns and CursorOver directives or the SETDOS /S command.
  7286.              The correspondence between SETDOS options and .INI directives
  7287.              is noted under each directive below, and under each option of
  7288.              the SETDOS command.
  7289.  
  7290.              Secondary shells automatically inherit the configuration
  7291.              settings currently in effect in the previous shell.  If values
  7292.              have been changed by SETDOS since the primary shell started,
  7293.              the current values will be passed to the secondary shell.  If
  7294.              the previous shell's .INI file had a [Secondary] section, it
  7295.              will then be read and processed.  If not, the previous shell's
  7296.              settings will remain in effect.
  7297.  
  7298.              For example, you might set BatchEcho to Yes in the .INI file,
  7299.              to enable batch file echo.  If you then use SETDOS /V0 to turn
  7300.              off batch file echoing in the primary shell, then any
  7301.              secondary shells will inherit the SETDOS setting, rather than
  7302.              the original value from the .INI file; i.e., batch files in
  7303.              the secondary shell will default to no echo.
  7304.  
  7305.              If you want to force secondary shells to start with a specific
  7306.              value for a particular directive, regardless of any changes
  7307.              made with SETDOS in a previous shell, repeat the directive in
  7308.              the [Secondary] section of the .INI file.
  7309.  
  7310.      4DOS    If you start a secondary shell from a task switching program
  7311.              like Windows, DESQview, or Back & Forth, you can specify an
  7312.              alternate location and name for 4DOS.INI by passing the
  7313.              "@d:\path\inifile" option to 4DOS as a command-line parameter
  7314.              (see your 4DOS Introduction and Installation Guide for
  7315.              details).  In this case, the configuration settings in the
  7316.  
  7317.         -------------------------------------------------------------------
  7318.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 123
  7319.  
  7320.                                                   CHAPTER 5 / CONFIGURATION
  7321.         -------------------------------------------------------------------
  7322.  
  7323.              alternate 4DOS.INI file will supersede any settings inherited
  7324.              from the previous shell.  Any values which are not explicitly
  7325.              set in the alternate file will retain the value they had in
  7326.              the previous shell.
  7327.  
  7328.              The first section below lists the different types of
  7329.              directives.  Subsequent sections list all the individual
  7330.              directives, divided by function and then alphabetically by
  7331.              directive name.  At the end we have included a few examples of
  7332.              how to use the .INI file directives (see page 144).
  7333.  
  7334.  
  7335.              Types of Directives
  7336.  
  7337.              There are 8 types of directives in the .INI file.  The
  7338.              different types of directives are shown in the lists below as
  7339.              follows:
  7340.  
  7341.                   * Name = nnnn (1234):  This directive takes a numeric
  7342.                     value which replaces the "nnnn."  The default value is
  7343.                     shown in parentheses.
  7344.  
  7345.                   * Name = c (X):  This directive accepts a single
  7346.                     character as its value.  The default character is
  7347.                     shown in parentheses.  You must type in the actual
  7348.                     character; you cannot use a key name.
  7349.  
  7350.                   * Name = CHOICE1 | Choice2 | ... :  This directive takes
  7351.                     a choice value.  The possible choices are listed,
  7352.                     separated by vertical bars.  The default value is
  7353.                     shown in all upper case letters in the directive
  7354.                     description, but in your file any of the choices can
  7355.                     be entered in upper case or lower case.  For example,
  7356.                     if the choices were shown as "YES | No" then "YES" is
  7357.                     the default.
  7358.  
  7359.                   * Name = Color:  This directive takes a color
  7360.                     specification.  See page 26 for the format of color
  7361.                     names.
  7362.  
  7363.                   * Name = Key (Default):  This directive takes a key
  7364.                     specification.  See page 31 for the format of key
  7365.                     names.
  7366.  
  7367.                   * Name = Path:  This directive takes a path
  7368.                     specification, but not a filename.  The value should
  7369.                     include both a drive and path (e.g., C:\4DOS) to avoid
  7370.                     any possible ambiguities.  A trailing backslash [\] at
  7371.  
  7372.  
  7373.         -------------------------------------------------------------------
  7374.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 124
  7375.  
  7376.                                                   CHAPTER 5 / CONFIGURATION
  7377.         -------------------------------------------------------------------
  7378.  
  7379.                     the end of the path name is acceptable but not
  7380.                     required.  Any default path is described in the text.
  7381.  
  7382.                   * Name = File:  This directive takes a filename.  We
  7383.                     recommend that you use a full filename including the
  7384.                     drive letter and path to avoid any possible
  7385.                     ambiguities.  Any default filename is described in the
  7386.                     text.
  7387.  
  7388.                   * Name = String:  This directive takes a string in the
  7389.                     format shown.  The text describes the default value
  7390.                     and any additional requirements for formatting the
  7391.                     string correctly.  No comments are allowed.
  7392.  
  7393.              4DOS, 4OS2, and 4DOS/NT each contain a fixed-length area for
  7394.              storing strings entered in the .INI file, including file
  7395.              names, paths, and other strings.  This area is large and is
  7396.              unlikely to overflow; if it does, you will receive an error
  7397.              message.  If this occurs, reduce the complexity of your .INI
  7398.              file or contact our technical support department for
  7399.              assistance.
  7400.  
  7401.              Each directive is listed below with its name, type, and
  7402.              default value.  In some cases, no default is shown because the
  7403.              default value is different for different products; in these
  7404.              cases, the default is described in the text.
  7405.  
  7406.  
  7407.              Initialization Directives
  7408.  
  7409.              The directives in this section control how your command
  7410.              processor starts and where it looks for its files.
  7411.  
  7412.                   4StartPath = Path:  Sets the drive and directory where
  7413.                   the 4START and 4EXIT batch files (if any) are located.
  7414.  
  7415.      4DOS         Alias = nnnn  (1024):  Sets the amount of memory in bytes
  7416.                   allocated for the alias list.  The allowable range of
  7417.                   values is 256 to 32767 bytes.  This directive is not
  7418.                   needed in 4OS2 or 4DOS/NT because both adjust the size of
  7419.                   the alias list dynamically.  If you use a global alias
  7420.                   list (see page 163), the Alias value is ignored in all
  7421.                   shells except the shell which first establishes the
  7422.                   global list.
  7423.  
  7424.      4DOS         AutoExecPath = Path | File:  Sets the path used to find
  7425.                   AUTOEXEC.BAT if 4DOS is started as a primary shell with
  7426.                   the /P option in CONFIG.SYS (see your Introduction and
  7427.                   Installation Guide).  If you include only a path, 4DOS
  7428.  
  7429.         -------------------------------------------------------------------
  7430.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 125
  7431.  
  7432.                                                   CHAPTER 5 / CONFIGURATION
  7433.         -------------------------------------------------------------------
  7434.  
  7435.                   will look for AUTOEXEC.BAT in the specified directory.
  7436.                   If you include a complete file name, 4DOS will look for
  7437.                   the specified file, and will not look for AUTOEXEC.BAT.
  7438.                   The default is the file AUTOEXEC.BAT in the root
  7439.                   directory of the boot drive.
  7440.  
  7441.                   Using AutoExecPath with a complete file name lets you
  7442.                   store multiple startup files in a single directory.  You
  7443.                   may find this useful under DOS if you have multiple boot
  7444.                   software and use different startup files under different
  7445.                   configurations, or under OS/2 if you have several DOS
  7446.                   sessions with different startup files.  If you are
  7447.                   running under OS/2, using AutoExecPath is equivalent to
  7448.                   setting DOS_AUTOEXEC on a session's DOS settings notebook
  7449.                   page (see the OS/2 documentation and your Introduction
  7450.                   and Installation Guide for details on DOS settings).
  7451.  
  7452.      4DOS         AutoExecParms = String:  Sets the parameter or parameters
  7453.                   to be passed to AUTOEXEC.BAT, or the file specified with
  7454.                   the AutoExecPath directive, above, when 4DOS is started
  7455.                   as a primary shell with the /P option in CONFIG.SYS (see
  7456.                   your Introduction and Installation Guide).  The
  7457.                   parameters will be available in your AUTOEXEC.BAT file as
  7458.                   %1, %2, etc.
  7459.  
  7460.      4DOS         Environment = nnnn  (512):  Sets the amount of memory
  7461.                   allocated to the environment in bytes.  The allowable
  7462.                   range of values is 256 to 32767 bytes.  This directive is
  7463.                   not needed in 4OS2 or 4DOS/NT because both adjust the
  7464.                   size of the environment dynamically.
  7465.  
  7466.      4DOS         EnvFree = nnnn  (128):  Sets the minimum amount of memory
  7467.                   in bytes that will be available in the environment for
  7468.                   secondary shells.  4DOS will enlarge the environment for
  7469.                   each secondary shell, if necessary, so that there is at
  7470.                   least this much free environment space when the shell
  7471.                   starts.  The allowable range of values is 128 to 32767
  7472.                   bytes.
  7473.  
  7474.      4OS2         HelpBook = String:  Sets the names of the "books" to be
  7475.                   loaded when 4OS2 help is invoked with the HELP command or
  7476.                   the F1 key.  The default is 4OS2+CMDREF which loads the
  7477.                   4OS2 help and the OS/2 command reference.  See the 4OS2
  7478.                   Introduction and Installation Guide for details about
  7479.                   this directive.
  7480.  
  7481.      4DOS         HelpOptions = String:  Sets default options for the 4DOS
  7482.                   help system.  For the available options, see your 4DOS
  7483.                   Introduction and Installation Guide.
  7484.  
  7485.         -------------------------------------------------------------------
  7486.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 126
  7487.  
  7488.                                                   CHAPTER 5 / CONFIGURATION
  7489.         -------------------------------------------------------------------
  7490.  
  7491.      4DOS         HelpPath = Path:  Sets the path used to find 4HELP.EXE
  7492.                   when F1 is pressed or the HELP command is used.  If this
  7493.                   directive is not used, 4DOS will search the current
  7494.                   directory and each of the directories in the PATH.
  7495.  
  7496.                   History = nnnn  (1024):  Sets the amount of memory
  7497.                   allocated to the command history list in bytes.  The
  7498.                   allowable range of values is 512 to 8192 bytes.  If you
  7499.                   use a global history list (see page 38), the History
  7500.                   value is ignored in all shells except the shell which
  7501.                   first establishes the global list.
  7502.  
  7503.                   INIQuery = Yes | NO:  If set to Yes, a prompt will be
  7504.                   displayed before execution of each subsequent line in the
  7505.                   current .INI file.  This allows you to modify certain
  7506.                   directives when you start the command processor in order
  7507.                   to test different configurations.  INIQuery can be reset
  7508.                   to No at any point in the file.  Normally INIQuery = Yes
  7509.                   is only used during testing of other .INI file
  7510.                   directives.
  7511.  
  7512.                   The prompt generated by INIQuery = Yes is:
  7513.  
  7514.                        [contents of the line]  (Y/N/Q/R/E)  ?
  7515.  
  7516.                   At this prompt, you may enter:
  7517.  
  7518.                        Y = Yes:  Process this line and go on to the next.
  7519.                        N = No:   Skip this line and go on to the next.
  7520.                        Q = Quit: Skip this line and all subsequent lines.
  7521.                        R = Rest: Execute this and all subsequent lines.
  7522.                        E = Edit: Prompt for a new value for this entry.
  7523.  
  7524.                   If you choose E for Edit, you can enter a new value for
  7525.                   the directive, but not a new directive name.
  7526.  
  7527.                   For example, if you have found a compatibility problem
  7528.                   you think may be related to 4DOS's swapping or upper
  7529.                   memory block usage, you might change your 4DOS.INI file
  7530.                   so a part of it read as follows:
  7531.  
  7532.                        INIQuery = Yes
  7533.                        Swapping = XMS, EMS, C:\
  7534.                        UMBLoad = Yes
  7535.                        UMBEnvironment = Yes
  7536.                        INIQuery = No
  7537.  
  7538.                   You could then choose to process, ignore, or edit the
  7539.                   Swapping,  UMBLoad, or UMBEnvironment directive each time
  7540.  
  7541.         -------------------------------------------------------------------
  7542.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 127
  7543.  
  7544.                                                   CHAPTER 5 / CONFIGURATION
  7545.         -------------------------------------------------------------------
  7546.  
  7547.                   4DOS started.  This would allow you to test several
  7548.                   possible combinations to see if you could resolve the
  7549.                   compatibility problem.
  7550.  
  7551.                   LocalAliases = Yes | No:  The default value is Yes in
  7552.                   4DOS and No in 4OS2 and 4DOS/NT.  No forces all copies of
  7553.                   the command processor to share the same alias list.  Yes
  7554.                   keeps the lists for each shell separate.  See page 163
  7555.                   for more details on local and global alias lists.
  7556.  
  7557.                   LocalHistory = Yes | No:  The default value is Yes in
  7558.                   4DOS and No in 4OS2 and 4DOS/NT.  No forces all copies of
  7559.                   the command processor to share the same history list.
  7560.                   Yes keeps the lists for each shell separate.  See page 38
  7561.                   for more details on local and global history lists.
  7562.  
  7563.                   PauseOnError = YES | No:  Yes forces a pause with the
  7564.                   message "Error in filename, press any key to continue
  7565.                   processing" after displaying any error message related to
  7566.                   a specific line in the .INI file.  No continues
  7567.                   processing with no pause after an error message is
  7568.                   displayed.
  7569.  
  7570.      4DOS         Swapping = swap type [, swap type] ...:  Sets the type of
  7571.                   swapping 4DOS should use.  4DOS runs in two parts, a
  7572.                   resident portion that is always in memory and a transient
  7573.                   portion that is "swapped" to EMS memory, XMS memory, a
  7574.                   RAM disk, or your hard disk while application programs
  7575.                   are running.  The swap area for the transient portion
  7576.                   normally requires about 128K bytes of memory or disk
  7577.                   space for the primary shell, and 28 - 32K bytes for each
  7578.                   secondary shell.
  7579.  
  7580.                   The swap type can be EMS to swap to EMS expanded memory,
  7581.                   XMS to swap to XMS extended memory, d:\path to swap to
  7582.                   the specified drive and path, or None for no swapping.
  7583.  
  7584.                   If you use d:\path, 4DOS will create the file
  7585.                   4DOSSWAP.nnn in the specified directory.  The file name
  7586.                   changes if UniqueSwapName is set to Yes (see page 144).
  7587.                   If you use None, the transient portion of 4DOS will
  7588.                   remain in memory at all times; this will reduce memory
  7589.                   available for application programs by about 128K.
  7590.  
  7591.                   You can specify multiple swap types and 4DOS will try
  7592.                   them in the order listed.  Swap type "None" is always
  7593.                   appended to your list of possible swap types as a "last
  7594.                   resort," even if you don't include it explicitly.  The
  7595.                   default Swapping specification is EMS, XMS, x:\, None,
  7596.  
  7597.         -------------------------------------------------------------------
  7598.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 128
  7599.  
  7600.                                                   CHAPTER 5 / CONFIGURATION
  7601.         -------------------------------------------------------------------
  7602.  
  7603.                   where x is the boot drive.  In most cases you will find
  7604.                   that the default setting works without modification.
  7605.  
  7606.                   Before changing the Swapping specification, see your 4DOS
  7607.                   Introduction and Installation Guide for more detail on
  7608.                   swapping types and the way 4DOS uses memory.
  7609.  
  7610.      4DOS         UMBAlias = Yes | NO | 1 | 2 ... | 8:  Yes attempts to
  7611.                   load global alias list storage into a UMB (Upper Memory
  7612.                   Block).  If you use a specific region number (1 through
  7613.                   8), 4DOS will attempt to reserve room for the global
  7614.                   alias list in that UMB region.
  7615.  
  7616.                   Region numbers can be used under MS-DOS / PC-DOS 5.0 and
  7617.                   above, and under OS/2's DOS support.  To use them, you
  7618.                   must enable DOS UMB management with the DOS=UMB or
  7619.                   DOS=HIGH,UMB directive in CONFIG.SYS.  See your 4DOS
  7620.                   Introduction and Installation Guide for complete details
  7621.                   on UMBs and UMB regions, and the hardware and software
  7622.                   required to support them.
  7623.  
  7624.                   If you use an invalid region number, or if region numbers
  7625.                   have not been enabled on your system, 4DOS will load the
  7626.                   global alias list into the first available region.  If no
  7627.                   upper memory is available, space for the global alias
  7628.                   list will be reserved in low memory.
  7629.  
  7630.                   UMBAlias applies to global aliases only, and is only used
  7631.                   in the first shell which establishes the global alias
  7632.                   area (see page 163 for more information on local and
  7633.                   global alias lists).  If you specify LocalAliases = Yes,
  7634.                   or if the previous shell already created a global alias
  7635.                   area, any UMBAlias setting is ignored.
  7636.  
  7637.      4DOS         UMBEnvironment = Yes | NO | 1 | 2 ... | 8:  Yes attempts
  7638.                   to load the master environment into a UMB (Upper Memory
  7639.                   Block).  This reduces 4DOS's base memory requirements but
  7640.                   may cause problems with some programs that try to access
  7641.                   the master environment directly.  See UMBAlias (above)
  7642.                   for information on the use of UMBs and region numbers.
  7643.  
  7644.      4DOS         UMBHistory = Yes | NO | 1 | 2 ... | 8:  Yes attempts to
  7645.                   load global history list storage into a UMB (Upper Memory
  7646.                   Block).  If you use a specific region number (1 through
  7647.                   8), 4DOS will attempt to reserve room for the global
  7648.                   history list in that UMB region.  See page 38 for more
  7649.                   information on local and global history lists.  See
  7650.                   UMBAlias (above) for information on the use of UMBs and
  7651.  
  7652.  
  7653.         -------------------------------------------------------------------
  7654.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 129
  7655.  
  7656.                                                   CHAPTER 5 / CONFIGURATION
  7657.         -------------------------------------------------------------------
  7658.  
  7659.                   region numbers.  Like UMBAlias, UMBHistory will be
  7660.                   ignored if a global history list is not used.
  7661.  
  7662.      4DOS         UMBLoad = Yes | NO | 1 | 2 ... | 8:  Yes attempts to load
  7663.                   the resident portion of 4DOS into a UMB (Upper Memory
  7664.                   Block).  This reduces the size of the resident portion in
  7665.                   base memory from about 3K bytes to 256 bytes.  See
  7666.                   UMBAlias (above) for information on the use of UMBs and
  7667.                   region numbers.
  7668.  
  7669.      4OS2,        WindowState = STANDARD | Maximize | Minimize:  Sets the
  7670.      4NT          initial state of the 4OS2 or 4DOS/NT window.  Standard
  7671.                   puts the window in the default position on the OS/2 or
  7672.                   Windows NT desktop, and is the default setting.  Maximize
  7673.                   maximizes the window; Minimize minimizes it.  If you use
  7674.                   Maximize or Minimize, you may see the 4OS2 or 4DOS/NT
  7675.                   window appear briefly in the Standard position as it is
  7676.                   created by the operating system, then switch to the new
  7677.                   state.
  7678.  
  7679.      4OS2,        WindowX = nnnn, WindowY = nnnn, WindowWidth = nnnn,
  7680.      4NT          WindowHeight = nnnn:  These 4 directives set the initial
  7681.                   size and position of the 4OS2 or 4DOS/NT window.  The
  7682.                   measurements are in pixels or pels.  Under 4OS2, WindowX
  7683.                   and WindowY refer to the position of the bottom left
  7684.                   corner of the window relative to the bottom left corner
  7685.                   of the screen.  Under 4DOS/NT, WindowX and WindowY refer
  7686.                   to the position of the top left corner of the window
  7687.                   relative to the top left corner of the screen.
  7688.  
  7689.  
  7690.              Configuration Directives
  7691.  
  7692.              These directives control the way that 4DOS, 4OS2, and 4DOS/NT
  7693.              operate.  Some can be changed with the SETDOS command while
  7694.              the command processor is running.  Any corresponding SETDOS
  7695.              command is listed in the description of each directive;
  7696.              information on SETDOS begins on page 308.
  7697.  
  7698.                   AmPm = Yes | NO | Auto:  Yes displays times in 12-hour
  7699.                   format with a trailing "a" for AM or "p" for PM.  The
  7700.                   default of No forces a display in 24-hour time format.
  7701.                   Auto formats the time according to the country code set
  7702.                   for your system.  AmPm controls the time displays used by
  7703.                   DIR and SELECT, in LOG files, and the output of the
  7704.                   TIMER, DATE, and TIME commands.  It has no effect on
  7705.                   %_TIME, %@MAKETIME, the $t and $T options of PROMPT, or
  7706.                   date and time ranges.
  7707.  
  7708.  
  7709.         -------------------------------------------------------------------
  7710.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 130
  7711.  
  7712.                                                   CHAPTER 5 / CONFIGURATION
  7713.         -------------------------------------------------------------------
  7714.  
  7715.      4DOS         ANSI = AUTO | Yes | No:  Tells 4DOS whether an ANSI
  7716.                   driver is installed and should be used for the CLS and
  7717.                   COLOR commands.  4DOS normally determines this itself,
  7718.                   but if you are using a non-standard ANSI driver or your
  7719.                   loading sequence is unusual, you may need to explicitly
  7720.                   inform 4DOS.  Also see SETDOS /A.  This directive is not
  7721.                   available in 4OS2 (because 4OS2 assumes that ANSI support
  7722.                   is always enabled), or 4DOS/NT (because Windows NT does
  7723.                   not offer ANSI support).
  7724.  
  7725.                   BatchEcho = YES | No:  Sets the default batch ECHO mode.
  7726.                   Yes enables echoing of all batch file commands unless
  7727.                   ECHO is explicitly set off in the batch file.  No
  7728.                   disables batch file echoing unless ECHO is explicitly set
  7729.                   on.  Also see SETDOS /V.
  7730.  
  7731.                   BeepFreq = nnnn  (440):  Sets the default BEEP command
  7732.                   frequency in Hz.  This is also the frequency for "error"
  7733.                   beeps (for example, if you press an illegal key).  To
  7734.                   disable all error beeps set this or BeepLength to 0.  If
  7735.                   you do, the BEEP command will still be operable, but will
  7736.                   not produce sound unless you explicitly specify the
  7737.                   frequency and duration.
  7738.  
  7739.                   BeepLength = nnnn  (2):  Sets the default BEEP length in
  7740.                   system clock ticks (approximately 1/18 of a second per
  7741.                   tick).  BeepLength is also the default length for "error"
  7742.                   beeps (for example, if you press an illegal key).
  7743.  
  7744.                   CommandSep = c:  This is the character used to separate
  7745.                   multiple commands on the same line.  The default is the
  7746.                   caret [^] in 4DOS, and the ampersand [&] in 4OS2 and
  7747.                   4DOS/NT.  You cannot use any of the redirection
  7748.                   characters (| > < ) or any of the whitespace characters
  7749.                   (space, tab, comma, or equal sign).  Also see SETDOS /C,
  7750.                   the %+ internal variable on page 100, and page 72 for
  7751.                   information on using compatible command separators for
  7752.                   two or more products.
  7753.  
  7754.                   CursorIns = nnnn  (100):  This is the shape of the cursor
  7755.                   for insert mode during command-line editing and all
  7756.                   commands which accept line input (DESCRIBE, ESET, etc.).
  7757.                   The size is a percentage of the total character cell
  7758.                   size, between 0% and 100%.  Because of the way video
  7759.                   BIOSes and drivers map the cursor shape, you may not get
  7760.                   a smooth progression in cursor shapes as CursorIns and
  7761.                   CursorOver change.  Also see SETDOS /S.
  7762.  
  7763.  
  7764.  
  7765.         -------------------------------------------------------------------
  7766.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 131
  7767.  
  7768.                                                   CHAPTER 5 / CONFIGURATION
  7769.         -------------------------------------------------------------------
  7770.  
  7771.                   CursorOver = nnnn  (15):  This is the shape of the cursor
  7772.                   for overtype mode during command-line editing and all
  7773.                   commands which accept line input.  The size is a
  7774.                   percentage of the total character cell size, between 0%
  7775.                   and 100%.  Also see SETDOS /S.
  7776.  
  7777.                   DescriptionMax = nnnn (40):  Controls the description
  7778.                   length limit for DESCRIBE (see page 193).  The allowable
  7779.                   range is 20 to 200 characters.
  7780.  
  7781.                   Descriptions = YES | No:  Turns description handling on
  7782.                   or off during the file processing commands COPY, DEL,
  7783.                   MOVE, and REN.  If set to No, the command processor will
  7784.                   not update the description file when files are moved,
  7785.                   copied, deleted or renamed.  Also see SETDOS /D.
  7786.  
  7787.                   EditMode = Insert | OVERSTRIKE:  This directive lets you
  7788.                   start the command-line editor in either insert or
  7789.                   overstrike mode.  Also see SETDOS /M.
  7790.  
  7791.                   EscapeChar = c :  Sets the character used to suppress the
  7792.                   normal meaning of the following character.  The default
  7793.                   is  Ctrl-X [-] in 4DOS, and a caret [^] in 4OS2 and
  7794.                   4DOS/NT.  See page 71 for a description of the escape
  7795.                   character and special escape sequences.  You cannot use
  7796.                   any of the redirection characters (|, >, or < ) or the
  7797.                   whitespace characters (space, tab, comma, or equal sign)
  7798.                   as the escape character.  Also see SETDOS /E, the %=
  7799.                   internal variable on page 99, and page 72 for information
  7800.                   on using compatible escape characters for two or more
  7801.                   products.
  7802.  
  7803.                   HistCopy = Yes | NO:  Controls what happens when you re-
  7804.                   execute a line from the command history.  If this option
  7805.                   is set to Yes, the line is appended to the end of the
  7806.                   history list.  By default, or if this option is set to
  7807.                   No, no copy of the command is made.  The original copy of
  7808.                   the command is always retained at its original position
  7809.                   in the list, regardless of the setting of HistCopy.
  7810.  
  7811.                   HistLogName = File:  Sets the history log file name
  7812.                   and/or path.  If only a path is given, the default log
  7813.                   file name (4DOSHLOG, 4OS2HLOG, etc.) will be used.  Using
  7814.                   HistLogName does not turn history logging on; you must
  7815.                   use a LOG /H ON command to do so.
  7816.  
  7817.                   HistMin = nnnn  (0):  Sets the minimum command-line size
  7818.                   to save in the command history list.  Any command line
  7819.                   whose length is less than this value will not be saved.
  7820.  
  7821.         -------------------------------------------------------------------
  7822.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 132
  7823.  
  7824.                                                   CHAPTER 5 / CONFIGURATION
  7825.         -------------------------------------------------------------------
  7826.  
  7827.                   Legal values range from 0, which saves everything, to the
  7828.                   maximum command-line length plus 1 (i.e., 256 in 4DOS, or
  7829.                   1024 in 4OS2 and 4DOS/NT), which disables all command
  7830.                   history saves.
  7831.  
  7832.                   HistWinColors = Color:  Sets the default colors for the
  7833.                   command-line and directory history windows.  If this
  7834.                   directive is not used the colors will be reversed from
  7835.                   the current colors on the screen.
  7836.  
  7837.                   HistWinHeight = nn (12):  Sets the height of the command-
  7838.                   line and directory history windows in lines, including
  7839.                   the border.  Legal values range from 5 to the height of
  7840.                   your screen.  Any value which would cause the bottom of
  7841.                   the window to be off the screen will be adjusted so that
  7842.                   the entire window remains on the screen.
  7843.  
  7844.                   HistWinLeft = nn (40):  Sets the horizontal position of
  7845.                   the left side of the command-line and directory history
  7846.                   windows.  Legal values range from 0 (the left edge of the
  7847.                   screen) to the number of columns on your screen minus 10.
  7848.                   Any value which would cause the right side of a minimum-
  7849.                   width window to be off the screen will be adjusted so
  7850.                   that the entire window remains on the screen.
  7851.  
  7852.                   HistWinTop = nn (1):  Sets the vertical position of the
  7853.                   top of the command-line and directory history windows.
  7854.                   Legal values range from 0 (the top of the screen) to the
  7855.                   number of rows on your screen minus 5.  Any value which
  7856.                   would cause the bottom of a minimum-height window to be
  7857.                   off the screen will be adjusted so that the entire window
  7858.                   remains on the screen.
  7859.  
  7860.                   HistWinWidth = nn (36):  Sets the width of the command-
  7861.                   line and directory history windows in characters,
  7862.                   including the border.  Legal values range from 10 to the
  7863.                   width of your screen.  Any value which would cause the
  7864.                   right side of the window to be off the screen will be
  7865.                   adjusted so that the entire window remains on the screen.
  7866.  
  7867.      4DOS,        LineInput = Yes | NO:  This directive controls how 4DOS
  7868.      4NT          and 4OS2 get their input from the command line.  Yes
  7869.                   forces 4DOS and 4OS2 to perform line-by-line input, just
  7870.                   as COMMAND.COM and CMD.EXE do, instead of character-by-
  7871.                   character input.  This will disable command-line editing,
  7872.                   history recall, the directory history window, and
  7873.                   filename completion, and will reduce the 4OS2 input
  7874.                   length limit from 1023 characters to 255 characters.  It
  7875.                   is normally used only for rare memory-resident programs
  7876.  
  7877.         -------------------------------------------------------------------
  7878.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 133
  7879.  
  7880.                                                   CHAPTER 5 / CONFIGURATION
  7881.         -------------------------------------------------------------------
  7882.  
  7883.                   (TSRs) or applications which do not work properly unless
  7884.                   the command processor uses line input.  If you have a
  7885.                   particular program that requires line input, you can use
  7886.                   SETDOS /L to temporarily change modes.  See APPNOTES.DOC
  7887.                   (for 4DOS) or README.DOC (for 4OS2) for information on
  7888.                   programs which require this option.
  7889.  
  7890.                   LogName = File:  Sets the log file name and/or path. If
  7891.                   only a path is given, the default log file name (4DOSLOG,
  7892.                   4OS2LOG, etc.) will be used.  Using LogName does not turn
  7893.                   logging on; you must use a LOG ON command to do so.
  7894.  
  7895.                   NoClobber = Yes | NO:  If set to Yes, will prevent
  7896.                   standard output redirection (see page 50) from
  7897.                   overwriting an existing file, and will require that the
  7898.                   output file already exist for append redirection.  Also
  7899.                   see SETDOS /N.
  7900.  
  7901.                   ParameterChar = c:  Sets the character used after a
  7902.                   percent sign to specify all or all remaining command-line
  7903.                   arguments in a batch file or alias (e.g., %& or %n&; see
  7904.                   pages 79 and 162).  The default is the ampersand [&] for
  7905.                   4DOS and the dollar sign [$] for 4OS2 and 4DOS/NT.  Also
  7906.                   see SETDOS /P.  See page 72 for information on using
  7907.                   compatible parameter characters for two or more
  7908.                   products..
  7909.  
  7910.                   Printer = devicename:  Sets the output device that the
  7911.                   LIST command will print to.  By default, LPT1 is used.
  7912.                   The device can be PRN, LPT1 to 3, COM1 to 4, NUL (which
  7913.                   will disable printed output) or any other installed
  7914.                   character device.
  7915.  
  7916.      4DOS         ScreenColumns = nnnn:  Sets the number of columns used by
  7917.                   the video display.  Normally the screen size is
  7918.                   determined automatically, but if you have a non-standard
  7919.                   display you may need to set it explicitly.  Systems which
  7920.                   need to set OutputBIOS to Yes (see page 143) may also
  7921.                   need to use this directive.
  7922.  
  7923.                   ScreenRows = nnnn:  Sets the number of screen rows used
  7924.                   by the video display.  Normally the screen size is
  7925.                   determined automatically, but if you have a non-standard
  7926.                   display you may need to set it explicitly.  This value
  7927.                   does not affect screen scrolling, which is controlled by
  7928.                   your operating system, or (under DOS) your video BIOS or
  7929.                   ANSI driver.  ScreenRows is used only by the LIST and
  7930.                   SELECT commands, the paged output options of other
  7931.  
  7932.  
  7933.         -------------------------------------------------------------------
  7934.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 134
  7935.  
  7936.                                                   CHAPTER 5 / CONFIGURATION
  7937.         -------------------------------------------------------------------
  7938.  
  7939.                   commands (e.g., TYPE /P), and error checking in the
  7940.                   screen output commands.  Also see SETDOS /R.
  7941.  
  7942.                   UpperCase = Yes | NO:  Yes specifies that filenames
  7943.                   should be displayed in the traditional upper-case by
  7944.                   internal commands like COPY and DIR.  No allows the
  7945.                   normal 4DOS, 4OS2, and 4DOS/NT lower-case style.  This
  7946.                   directive does not affect the display of filenames on
  7947.                   HPFS and NTFS drives; see page 17 for more details.  Also
  7948.                   see SETDOS /U.
  7949.  
  7950.  
  7951.              Color Directives
  7952.  
  7953.              These directives control the colors that 4DOS, 4OS2, and
  7954.              4DOS/NT use for their displays.  Screen border colors can only
  7955.              be set in StdColors.  "BORder" color specifications included
  7956.              in other directives will be ignored.  For complete details on
  7957.              color names see page 26.
  7958.  
  7959.      4DOS,        BrightBG = Yes | No.  If set to Yes, 4DOS and 4OS2 will
  7960.      4OS2         enable bright background colors.  If set to No, bright
  7961.                   backgrounds will be disabled but blinking foreground
  7962.                   characters will be enabled.  If BrightBG is not used,
  7963.                   4DOS and 4OS2 will not adjust the bright background /
  7964.                   blinking foreground switch at all.  Most color video
  7965.                   boards default to a blinking foreground with bright
  7966.                   background colors disabled.  See also SETDOS /B.
  7967.  
  7968.                   Using BrightBG requires careful attention to interactions
  7969.                   of display type, mode, and color.  For a detailed
  7970.                   explanation, see page 27.
  7971.  
  7972.                   ColorDir = ext1 ext2 ...:colora;ext3 ext4 ... :colorb;
  7973.                   ...:  Sets the directory colors used by DIR and SELECT.
  7974.                   The format is the same as that used for the COLORDIR
  7975.                   environment variable.  See page 30 for a detailed
  7976.                   explanation of color-coded directories.
  7977.  
  7978.                   InputColors = Color:  Sets the colors used for command-
  7979.                   line input.  This setting is useful for making your input
  7980.                   stand out from the normal output.  InputColors will not
  7981.                   work properly under 4DOS unless you have an ANSI driver
  7982.                   loaded (see page 24 for more information on ANSI).
  7983.  
  7984.                   ListColors = Color:  Sets the colors used by the LIST
  7985.                   command.  If this directive is not used, LIST will use
  7986.                   the current default colors set by the CLS or COLOR
  7987.                   command or by the StdColors directive, below.
  7988.  
  7989.         -------------------------------------------------------------------
  7990.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 135
  7991.  
  7992.                                                   CHAPTER 5 / CONFIGURATION
  7993.         -------------------------------------------------------------------
  7994.  
  7995.                   ListStatBarColors = Color:  Sets the colors used on the
  7996.                   LIST status bar.  If this directive is not used, LIST
  7997.                   will set the status bar to the reverse of the screen
  7998.                   color (the screen color is controlled by ListColors,
  7999.                   above).
  8000.  
  8001.                   SelectColors = Color:  Sets the color used by the SELECT
  8002.                   command.  If this directive is not used, SELECT will use
  8003.                   the current default colors set by the CLS or COLOR
  8004.                   command or by the StdColors directive, below.
  8005.  
  8006.                   SelectStatBarColors = Color:  Sets the color used on the
  8007.                   SELECT status bar.  If this directive is not used, SELECT
  8008.                   will set the status bar to the reverse of the screen
  8009.                   color (the screen color is controlled by SelectColors,
  8010.                   above).
  8011.  
  8012.                   StdColors = Color:  Sets the standard colors to be used
  8013.                   when CLS is used without a color specification, and for
  8014.                   LIST and SELECT if ListColors and SelectColors are not
  8015.                   used.  Using this directive is similar to placing a COLOR
  8016.                   command in AUTOEXEC.BAT.  StdColors takes effect the
  8017.                   first time CLS, LIST, or SELECT is used after 4DOS, 4OS2,
  8018.                   or 4DOS/NT starts, but will not affect the color of error
  8019.                   or other messages displayed during the loading and
  8020.                   initialization process.  Under 4DOS, if ANSI.SYS or a
  8021.                   compatible driver is not loaded, the colors will not be
  8022.                   "sticky" - you may lose them when you run an application.
  8023.  
  8024.  
  8025.           ## Key Mapping Directives
  8026.  
  8027.              The directives in this group allow you to change the keys used
  8028.              for command-line editing and other internal functions.  They
  8029.              take effect only inside 4DOS, 4OS2, or 4DOS/NT, and do not
  8030.              affect other programs or the help system.
  8031.  
  8032.              The description of each directive below explains the function
  8033.              of the corresponding key.  Using the directive allows you to
  8034.              assign a different or additional key to perform the function
  8035.              described.  For example, to use function key F3 to invoke the
  8036.              HELP facility (normally invoked with F1):
  8037.  
  8038.                   Help = F3
  8039.  
  8040.              Any directive can be used multiple times to assign multiple
  8041.              keys to the same function.  For example:
  8042.  
  8043.                   ListFind = F        ;F does a find in LIST
  8044.  
  8045.         -------------------------------------------------------------------
  8046.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 136
  8047.  
  8048.                                                   CHAPTER 5 / CONFIGURATION
  8049.         -------------------------------------------------------------------
  8050.  
  8051.                   ListFind = F5       ;F5 also does a find in LIST
  8052.  
  8053.              Use some care when you reassign keystrokes.  If you assign a
  8054.              default key to a different function, it will no longer be
  8055.              available for its original use.  For example, if you assign F1
  8056.              to the AddFile directive (a part of filename completion), the
  8057.              F1 key will no longer invoke the help system, so you will
  8058.              probably want to assign a different key to Help.
  8059.  
  8060.              Please read the information on key names beginning on page 31
  8061.              before using the key mapping directives.
  8062.  
  8063.              Key assignments are processed before looking for keystroke
  8064.              aliases.  For example, if you assign Shift-F1 to HELP and also
  8065.              assign Shift-F1 to a key alias, the key alias will be ignored.
  8066.  
  8067.              Assigning a new keystroke for a function does not deassign the
  8068.              default keystroke for the same function.  If you want to
  8069.              deassign one of the default keys, use the NormalKey directive
  8070.              described below or the corresponding directive for keys in the
  8071.              other key groups (NormalEditKey, NormalHWinKey, or
  8072.              NormalListKey).
  8073.  
  8074.  
  8075.              General Input Keys
  8076.  
  8077.                   This first set of Key Mapping Directives applies to all
  8078.                   input.  These directives are in effect whenever 4DOS,
  8079.                   4OS2, or 4DOS/NT requests input from the keyboard,
  8080.                   including during command-line editing and the DESCRIBE,
  8081.                   ESET, INPUT, LIST, and SELECT commands.  See page 34 for
  8082.                   more information about command-line editing.
  8083.  
  8084.                   Backspace = Key  (Bksp):  Deletes the character to the
  8085.                   left of the cursor.
  8086.  
  8087.                   BeginLine = Key  (Home):  Moves the cursor to the
  8088.                   beginning of the line.
  8089.  
  8090.                   Del = Key  (Del):  Deletes the character at the cursor.
  8091.  
  8092.                   DelToBeginning = Key (Ctrl-Home):  Deletes from the
  8093.                   cursor to the start of the line.
  8094.  
  8095.                   DelToEnd = Key (Ctrl-End):  Deletes from the cursor to
  8096.                   the end of the line.
  8097.  
  8098.                   DelWordLeft = Key  (Ctrl-L):  Deletes the word to the
  8099.                   left of the cursor.
  8100.  
  8101.         -------------------------------------------------------------------
  8102.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 137
  8103.  
  8104.                                                   CHAPTER 5 / CONFIGURATION
  8105.         -------------------------------------------------------------------
  8106.  
  8107.                   DelWordRight = Key  (Ctrl-R, Ctrl-Bksp):  Deletes the
  8108.                   word to the right of the cursor.  See ClearKeyMap on page
  8109.                   141 if you need to remove the default mapping of Ctrl-
  8110.                   Bksp to this function.
  8111.  
  8112.                   Down = Key  (Down):  Scrolls the display down one line in
  8113.                   LIST; moves the cursor down one line in SELECT and in the
  8114.                   command-line history, directory history, or %@SELECT
  8115.                   window.  (Scrolling down through the command history at
  8116.                   the prompt is controlled by NextHistory on page 139, not
  8117.                   by this directive.)
  8118.  
  8119.                   EndLine = Key  (End):  Moves the cursor to the end of the
  8120.                   line.
  8121.  
  8122.                   EraseLine = Key  (Esc):  Deletes the entire line.
  8123.  
  8124.                   ExecLine = Key (Enter):  Executes or accepts a line.
  8125.  
  8126.                   Ins = Key (Ins):  Toggles insert / overstrike mode during
  8127.                   line editing.
  8128.  
  8129.                   Left = Key  (Left):  Moves the cursor left one character;
  8130.                   scrolls the display left 8 columns in LIST; scrolls the
  8131.                   display left 4 columns in the command-line, directory
  8132.                   history, or %@SELECT window.
  8133.  
  8134.                   NormalKey = Key:  Deassigns a general input key in order
  8135.                   to disable the usual meaning of the key within 4DOS,
  8136.                   4OS2, or 4DOS/NT and/or make it available for keystroke
  8137.                   aliases.  This will make the keystroke operate as a
  8138.                   "normal" key with no special function.  For example:
  8139.  
  8140.                        NormalKey = Ctrl-End
  8141.  
  8142.                   will disable Ctrl-End, which is the standard "delete to
  8143.                   end of line" key.  Ctrl-End could then be assigned to a
  8144.                   keystroke alias.  Another key could be assigned the
  8145.                   "delete to end of line" function with the DelToEnd
  8146.                   directive (above).
  8147.  
  8148.                   Right = Key  (Right):  Moves the cursor right one
  8149.                   character; scrolls the display right 8 columns in LIST;
  8150.                   scrolls the display right 4 columns in the command-line
  8151.                   history, directory history, or %@SELECT window.
  8152.  
  8153.                   Up = Key  (Up):  Scrolls the display up one line in LIST;
  8154.                   moves the cursor up one line in SELECT and in the
  8155.                   command-line history, directory history, or %@SELECT
  8156.  
  8157.         -------------------------------------------------------------------
  8158.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 138
  8159.  
  8160.                                                   CHAPTER 5 / CONFIGURATION
  8161.         -------------------------------------------------------------------
  8162.  
  8163.                   window.  (Scrolling up through the command history at the
  8164.                   prompt is controlled by PrevHistory on page 139, not by
  8165.                   this directive.)
  8166.  
  8167.                   WordLeft = Key  (Ctrl-Left):  Moves the cursor left one
  8168.                   word; scrolls the display left 40 columns in LIST.
  8169.  
  8170.                   WordRight = Key  (Ctrl-Right):  Moves the cursor right
  8171.                   one word; scrolls the display right 40 columns in LIST.
  8172.  
  8173.  
  8174.              Command-Line Editing Keys
  8175.  
  8176.                   The following directives apply only to command-line
  8177.                   editing.  They are only effective at the 4DOS, 4OS2, or
  8178.                   4DOS/NT prompt.
  8179.  
  8180.                   AddFile = Key  (F10):  Keeps the current filename
  8181.                   completion entry and inserts the next matching name.
  8182.  
  8183.                   CommandEscape = Key  (Alt-255):  Allows direct entry of a
  8184.                   keystroke that would normally be interpreted as an editor
  8185.                   command.
  8186.  
  8187.                   DelHistory = Key  (Ctrl-D):  Deletes the displayed
  8188.                   history list entry and displays the previous entry.
  8189.  
  8190.                   EndHistory = Key  (Ctrl-E):  Displays the last entry in
  8191.                   the history list.
  8192.  
  8193.                   Help = Key  (F1):  Invokes the HELP facility.
  8194.  
  8195.                   NextFile = Key  (F9, Tab):  Gets the next matching
  8196.                   filename.  See ClearKeyMap on page 141 if you need to
  8197.                   remove the default mapping of Tab to this function.
  8198.  
  8199.                   NextHistory = Key  (Down):  Recalls the next command from
  8200.                   the command history.
  8201.  
  8202.                   NormalEditKey = Key:  Deassigns a command-line editing
  8203.                   key in order to disable the usual meaning of the key
  8204.                   while editing a command line, and/or make it available
  8205.                   for keystroke aliases.  For details see the NormalKey
  8206.                   directive on page 138.
  8207.  
  8208.                   PopFile = Key  (F7, Ctrl-Tab):  Opens the filename
  8209.                   completion window.  You may not be able to use Ctrl-Tab,
  8210.                   because not all systems recognize it as a keystroke.  See
  8211.  
  8212.  
  8213.         -------------------------------------------------------------------
  8214.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 139
  8215.  
  8216.                                                   CHAPTER 5 / CONFIGURATION
  8217.         -------------------------------------------------------------------
  8218.  
  8219.                   ClearKeyMap on page 141 if you need to remove the default
  8220.                   mapping of Ctrl-Tab to this function.
  8221.  
  8222.                   PrevFile = Key  (F8, Shift-Tab):  Gets the previous
  8223.                   matching filename.  See ClearKeyMap on page 141 if you
  8224.                   need to remove the default mapping of Shift-Tab to this
  8225.                   function.
  8226.  
  8227.                   PrevHistory = Key  (Up):  Recalls the previous command
  8228.                   from the command history.
  8229.  
  8230.                   SaveHistory = Key  (Ctrl-K):  Saves the command line in
  8231.                   the command history list without executing it.
  8232.  
  8233.  
  8234.              History and @SELECT Window Keys
  8235.  
  8236.                   The following directives apply only to the command
  8237.                   history window, the directory history window, and
  8238.                   %@SELECT windows.
  8239.  
  8240.                   DirWinOpen = Key (Ctrl-PgUp):  Opens the directory
  8241.                   history window while at the command line.
  8242.  
  8243.                   HistWinBegin = Key (Ctrl-PgUp):  Moves to the first line
  8244.                   of the history when in the history window.
  8245.  
  8246.                   HistWinDel = Key (Ctrl-D):  Deletes a line from within
  8247.                   the history window.
  8248.  
  8249.                   HistWinEdit = Key (Ctrl-Enter):  Moves a line from the
  8250.                   history window to the prompt for editing.
  8251.  
  8252.                   HistWinEnd = Key (Ctrl-PgDn):  Moves to the last line of
  8253.                   the history when in the history window.
  8254.  
  8255.                   HistWinExec = Key (Enter):  Executes the selected line in
  8256.                   the history window.
  8257.  
  8258.                   HistWinOpen = Key (PgUp):  Brings up the history window
  8259.                   while at the command line.
  8260.  
  8261.                   NormalHWinKey = Key:  Deassigns a history window key in
  8262.                   order to disable the usual meaning of the key within the
  8263.                   history window.  For details see the NormalKey directive
  8264.                   on page 138.
  8265.  
  8266.  
  8267.  
  8268.  
  8269.         -------------------------------------------------------------------
  8270.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 140
  8271.  
  8272.                                                   CHAPTER 5 / CONFIGURATION
  8273.         -------------------------------------------------------------------
  8274.  
  8275.              LIST Keys
  8276.  
  8277.                   The keys in the last group of Key Mapping Directives are
  8278.                   effective only inside the LIST command.
  8279.  
  8280.                   ListFind = Key (F):  Prompts and searches for a string.
  8281.  
  8282.                   ListHex = Key (X):  Toggles hexadecimal display mode.
  8283.  
  8284.                   ListHighBit = Key (H):  Toggles LIST's "strip high bit"
  8285.                   option, which can aid in displaying files from certain
  8286.                   word processors.
  8287.  
  8288.                   ListInfo = Key (I):  Displays information about the
  8289.                   current file.
  8290.  
  8291.                   ListNext = Key (N):  Finds the next matching string.
  8292.  
  8293.                   ListPrint = Key (P):  Prints the file on LPT1.
  8294.  
  8295.                   ListWrap = Key (W):  Toggles LIST's wrap option on and
  8296.                   off.  The wrap option wraps text at the right margin.
  8297.  
  8298.                   NormalListKey = Key:  Deassigns a LIST key in order to
  8299.                   disable the usual meaning of the key within LIST.  For
  8300.                   details see the NormalKey directive on page 138.
  8301.  
  8302.  
  8303.           ## Advanced Directives
  8304.  
  8305.              These directives are generally used for unusual circumstances,
  8306.              or for diagnosing problems.  Most often they are not needed in
  8307.              normal use.
  8308.  
  8309.  
  8310.              Advanced Directives For 4DOS, 4OS2, and 4DOS/NT
  8311.  
  8312.                   The directives in this section work in 4DOS, 4OS2, and
  8313.                   4DOS/NT.
  8314.  
  8315.                   ClearKeyMap:  Clears all current key mappings.
  8316.                   ClearKeyMap is a special directive which has no value or
  8317.                   "=" after it.  Use ClearKeyMap to make one of the keys in
  8318.                   the default map (Tab, Shift-Tab, Ctrl-Tab, or Ctrl-Bksp)
  8319.                   available for a keystroke alias, or in the [Secondary]
  8320.                   section of the .INI file to clear key mappings inherited
  8321.                   from the primary shell.  ClearKeyMap should appear before
  8322.                   any key mapping directives.  If you want to clear some
  8323.                   but not all of the default mappings, use ClearKeyMap,
  8324.  
  8325.         -------------------------------------------------------------------
  8326.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 141
  8327.  
  8328.                                                   CHAPTER 5 / CONFIGURATION
  8329.         -------------------------------------------------------------------
  8330.  
  8331.                   then recreate the mappings you want to retain (e.g., with
  8332.                   "NextFile=Tab", etc.).
  8333.  
  8334.                   NextINIFile = File.  The full path and name of the file
  8335.                   must be specified.  All subsequent shells will read the
  8336.                   specified .INI file, and ignore any [Secondary] section
  8337.                   in the original .INI file.  Under 4DOS, if you have a
  8338.                   diskless or floppy-based workstation, NextINIFile will
  8339.                   allow you to shift 4DOS.INI to a network drive for
  8340.                   secondary shells, and avoid all access to the original
  8341.                   boot drive.
  8342.  
  8343.  
  8344.              Advanced Directives For 4DOS Only
  8345.  
  8346.      4DOS         The following advanced directives apply to 4DOS only, and
  8347.                   will not work in 4OS2 or 4DOS/NT.
  8348.  
  8349.                   CritFail = Yes | NO:  This is the same as /F on the
  8350.                   SHELL= line in CONFIG.SYS.  It intercepts all DOS
  8351.                   critical errors and returns a Fail to each.  We do not
  8352.                   recommend this on most systems, because you will not have
  8353.                   a chance to react to a critical error and correct the
  8354.                   problem that caused it.  It is intended for use on
  8355.                   bulletin boards or other systems where unattended
  8356.                   operation is required without user prompts.
  8357.  
  8358.                   DiskReset = Yes | NO:  Enables or disables disk resets
  8359.                   after COPY, DEL/ERASE, DESCRIBE, MOVE, and REN/RENAME,
  8360.                   before DIR, and when starting 4DOS.  Set to Yes if you
  8361.                   have problems with disk change detection on non-standard
  8362.                   or cached floppy disk drives, or with network software
  8363.                   which doesn't always properly flush data to the disk.
  8364.                   Such problems are very rare, so normally No is the best
  8365.                   choice.  Setting DiskReset to Yes may increase the time
  8366.                   required to start a secondary shell, and may reduce the
  8367.                   performance of DIR, COPY, MOVE, and RENAME, when using a
  8368.                   "staged-write" disk cache such as Microsoft's SmartDrive.
  8369.                   See APPNOTES.DOC for details on how specific cache
  8370.                   software is affected by the DiskReset setting.
  8371.  
  8372.                   DVCleanup = YES | No.  Controls the cleanup of 4DOS
  8373.                   resources (the shell number and any disk swap file) when
  8374.                   you close a 4DOS window from the DESQview menu.  See
  8375.                   APPNOTES.DOC  for more details.
  8376.  
  8377.                   FullINT2E = YES | No:  Enables full support for the
  8378.                   COMMAND.COM "back door" (interrupt 2E) which some
  8379.                   programs use to execute commands.  Effective only in a
  8380.  
  8381.         -------------------------------------------------------------------
  8382.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 142
  8383.  
  8384.                                                   CHAPTER 5 / CONFIGURATION
  8385.         -------------------------------------------------------------------
  8386.  
  8387.                   primary shell loaded via the SHELL= command in
  8388.                   CONFIG.SYS.  See Appendix B of the 4DOS Introduction and
  8389.                   Installation Guide for details on using INT 2E.  Also,
  8390.                   see APPNOTES.DOC for information on programs known to
  8391.                   require this option.  If this directive is set to No, INT
  8392.                   2E will return immediately to the calling program without
  8393.                   taking any action.  Setting FullINT2E to No reduces the
  8394.                   size of the primary shell by about 100 bytes.
  8395.  
  8396.                   Inherit = YES | No:  .INI file data, aliases, and the
  8397.                   history list are normally passed to secondary shells
  8398.                   automatically.  No disables this feature.
  8399.  
  8400.                   MessageServer = YES | No:  For compatibility with
  8401.                   COMMAND.COM in MS-DOS 4.x and above, 4DOS includes a
  8402.                   "message server" that retrieves error message text for
  8403.                   DOS external commands like DISKCOPY and FORMAT.  The
  8404.                   message server increases the size of the resident portion
  8405.                   of 4DOS by about 200 bytes.  No disables the message
  8406.                   server and saves this space, but will cause more cryptic
  8407.                   error messages such as "Parse error 3" or "Extended error
  8408.                   7" from some DOS external commands.  The message server
  8409.                   is automatically enabled by 4DOS in the primary 4DOS
  8410.                   shell loaded from CONFIG.SYS when running under MS-DOS
  8411.                   4.x or above, and disabled elsewhere.
  8412.  
  8413.                   NetwareNames = Yes | NO.  Set to Yes to include strings
  8414.                   in the resident portion of 4DOS which Novell Netware
  8415.                   searches for when it loads.  NetwareNames should be Yes
  8416.                   for Netware systems to avoid problems with destroyed
  8417.                   environment variables during LOGIN.  Setting NetwareNames
  8418.                   to Yes increases 4DOS's low DOS memory usage by 112
  8419.                   bytes.
  8420.  
  8421.                   OutputBIOS = Yes | NO:  Determines whether 4DOS uses the
  8422.                   BIOS for all screen displays.  If set to No, 4DOS will
  8423.                   use direct screen writes for color-coded directories and
  8424.                   the DRAWBOX, DRAWHLINE, DRAWVLINE, LIST, SELECT, SCRPUT,
  8425.                   and VSCRPUT commands.  If set to Yes, 4DOS will perform
  8426.                   these commands using BIOS calls.  This directive is only
  8427.                   needed for compatibility with unusual display adapters,
  8428.                   such as those used on Japanese systems running DOS/V.
  8429.                   Setting OutputBIOS to Yes may substantially reduce the
  8430.                   speed of the affected commands.
  8431.  
  8432.                   StackSize = nnnn (4096):  Set the 4DOS internal stack
  8433.                   size.  The allowable range of values is 4096 to 8192.
  8434.  
  8435.  
  8436.  
  8437.         -------------------------------------------------------------------
  8438.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 143
  8439.  
  8440.                                                   CHAPTER 5 / CONFIGURATION
  8441.         -------------------------------------------------------------------
  8442.  
  8443.                   If you use complex combinations of "prefix" commands like
  8444.                   DO, EXCEPT, FOR, GLOBAL, IF, IFF, and SELECT on the same
  8445.                   command line, and especially if you use these commands in
  8446.                   multiple nested batch files or GOSUBs, you may encounter
  8447.                   a "4DOS internal stack overflow" error.  If you do, you
  8448.                   should use this directive to increase the amount of stack
  8449.                   space available.
  8450.  
  8451.                   For virtually all users, the default stack size will be
  8452.                   sufficient.  If you increase the stack size, you will
  8453.                   increase the size of 4DOS's transient portion in memory,
  8454.                   and the size of the 4DOS swap area, by the amount of the
  8455.                   stack size increase.
  8456.  
  8457.                   You will not normally encounter a stack size problem with
  8458.                   4OS2 or 4DOS/NT, because both can increase the size of
  8459.                   the internal stack dynamically.  This is not feasible
  8460.                   under DOS.
  8461.  
  8462.                   SwapReopen = Yes | NO:  Set to Yes to enable reopening of
  8463.                   the 4DOS swap file if it is closed by another program.
  8464.                   This is required when swapping 4DOS to Novell Netware
  8465.                   drives or when using other applications which close
  8466.                   4DOS's swap file.  In all other circumstances, it is only
  8467.                   useful for diagnostic purposes.  Setting SwapReopen to
  8468.                   Yes also disables the reduced swapping size normally used
  8469.                   in 4DOS secondary shells.
  8470.  
  8471.                   UniqueSwapName = Yes | No:  Set to Yes to change the disk
  8472.                   swap file name from 4DOSSWAP.nnn to a unique name
  8473.                   generated by 4DOS, with an extension of "4SW" (e.g.,
  8474.                   A1CD6B11.4SW).  This prevents conflicts between swap
  8475.                   files in different shells; it is only necessary when you
  8476.                   are using disk swapping with a COMMAND.COM primary shell
  8477.                   or in an OS/2 2.x DOS session.  The default is Yes in
  8478.                   OS/2 DOS sessions and No elsewhere.  UniqueSwapName only
  8479.                   works in DOS 3.0 and above, and in OS/2 DOS sessions, and
  8480.                   applies only to disk swapping.
  8481.  
  8482.  
  8483.              Examples
  8484.  
  8485.              The following examples will give you an idea of the types of
  8486.              things that can be done with the .INI file.  The comments on
  8487.              each directive explain what it does.
  8488.  
  8489.              First, a very simple 4DOS example that just sets up swapping
  8490.              and environment size, leaving everything else at its default
  8491.              value:
  8492.  
  8493.         -------------------------------------------------------------------
  8494.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 144
  8495.  
  8496.                                                   CHAPTER 5 / CONFIGURATION
  8497.         -------------------------------------------------------------------
  8498.  
  8499.                   Swapping = ems, c:\           ;try EMS, then C: root
  8500.                   Environment = 1024            ;set environment size
  8501.  
  8502.              Here's another 4DOS example, for a system which supports Upper
  8503.              Memory blocks (UMBs).  Several settings take advantage of
  8504.              UMBs, and others modify the 4DOS configuration to match the
  8505.              user's preferences.  Note that the comment for the Swapping
  8506.              directive is on separate lines before the directive itself, as
  8507.              no comments are allowed in string directives:
  8508.  
  8509.                   Environment = 3072            ;expand environment to 3K
  8510.                   Alias = 6144                  ;expand aliases to 6K
  8511.                   LocalHistory = No             ;use a global history
  8512.                     ;for swapping try XMS, then RAM disk H:, then
  8513.                     ;hard disk C:
  8514.                   Swapping = xms, h:\, c:\
  8515.                   UMBLoad = Yes                 ;res. part of 4DOS in UMB
  8516.                   UMBEnvironment = Yes          ;master environment in UMB
  8517.                   UMBHistory = Yes              ;global history in UMB
  8518.                   BatchEcho = No                ;default is ECHO OFF
  8519.                   EditMode = Insert             ;editor in insert mode
  8520.                   CursorOver = 100              ;overstrike cursor 100%
  8521.                   CursorIns = 10                ;insert cursor 10%
  8522.  
  8523.              This example for 4OS2 configures certain special characters to
  8524.              match 4DOS, and changes other default settings to suit the
  8525.              user's preferences.  All of these settings except HelpBook
  8526.              would also work in 4DOS or 4DOS/NT:
  8527.  
  8528.                   PauseOnError = No             ;don't stop on INI errors
  8529.                   CommandSep = ^                ;4DOS command separator
  8530.                   EscapeChar = -                ;4DOS escape character
  8531.                   ParameterChar = &             ;4DOS parameter character
  8532.                   BatchEcho = No                ;default to ECHO OFF
  8533.                   HelpBook = 4OS2
  8534.                   History = 2048                ;expand history to 2K bytes
  8535.                   BeepFreq = 880                ;make beep higher pitch
  8536.                   EditMode = Insert             ;insert mode for cmd edit
  8537.                   CursorOver = 100              ;overstrike cursor 100%
  8538.                   CursorIns = 10                ;insert cursor 10%
  8539.                   ListFind = F5                 ;F5 does a find in LIST
  8540.                   ListNext = F6                 ;and F6 does a find next
  8541.                   StdColors = bri cya on blu    ;default colors
  8542.                   ListColors = bri whi on blu   ;colors for LIST
  8543.                   SelectColors = bri whi on blu ;same colors for SELECT
  8544.                   colordir = DIRS:bri yel;com exe bat btm cmd:bri whi
  8545.  
  8546.  
  8547.  
  8548.  
  8549.         -------------------------------------------------------------------
  8550.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 145
  8551.  
  8552.                                         CHAPTER 6 / COMMAND REFERENCE GUIDE
  8553.         -------------------------------------------------------------------
  8554.  
  8555.  
  8556.         CHAPTER 6 / COMMAND REFERENCE GUIDE
  8557.  
  8558.  
  8559.         The following pages are a complete guide and reference to the 4DOS,
  8560.         4OS2, and 4DOS/NT commands that are available from the command
  8561.         line, in aliases, and in batch files.  All of these commands are
  8562.         internal commands, which means that the command processor performs
  8563.         the activity you have requested without running another program.
  8564.         (See page 18 for more information on internal and external
  8565.         commands.)
  8566.  
  8567.         We offer over 80 internal commands, many more than any version of
  8568.         COMMAND.COM or CMD.EXE.  These neither replace nor interfere with
  8569.         external commands like BACKUP, CHKDSK, DISKCOPY, or XCOPY.  You can
  8570.         continue to use those utilities like you always have.  Also, each
  8571.         of our command processors has been designed to be compatible with
  8572.         virtually all traditional internal commands, and to enhance most of
  8573.         those commands with additional options and capabilities.  Once you
  8574.         have installed your new command processor, you can continue using
  8575.         the commands that you already know and get the same results.
  8576.  
  8577.         We have made no attempt to document external DOS, OS/2, and Windows
  8578.         NT commands in this reference, partly because they are explained in
  8579.         your operating system manual, and partly because external commands,
  8580.         and the options available with each command, vary widely from one
  8581.         operating system to another and from one version to another.  The
  8582.         4DOS HELP system does include information about standard DOS
  8583.         external commands, and the 4OS2 HELP system can be configured to
  8584.         display information about OS/2 external commands (see the
  8585.         Introduction and Installation Guide for each product for further
  8586.         details).
  8587.  
  8588.         Most 4DOS, 4OS2, and 4DOS/NT commands are either enhanced
  8589.         traditional commands or are entirely new (a few are the same as
  8590.         traditional commands).  If you are comfortable using traditional
  8591.         commands, you can switch to your new command processor without
  8592.         making any changes in your habits.  But you will be missing a lot
  8593.         of the power of these enhancements and new commands unless you take
  8594.         a few minutes to see what's available here.  Make sure you don't
  8595.         skip a section of this reference just because you already know how
  8596.         to use a traditional command with the same name.
  8597.  
  8598.         If you come across terms or concepts in this chapter that you are
  8599.         unsure about, please refer to Chapter 1 / General Concepts, the
  8600.         Glossary on page 368, or the Index.
  8601.  
  8602.  
  8603.  
  8604.  
  8605.         -------------------------------------------------------------------
  8606.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 146
  8607.  
  8608.                                         CHAPTER 6 / COMMAND REFERENCE GUIDE
  8609.         -------------------------------------------------------------------
  8610.  
  8611.  
  8612.  
  8613.         Command Categories
  8614.  
  8615.              The best way to learn the commands is to use them and
  8616.              experiment with them.  We urge you to browse through this
  8617.              chapter occasionally and look for commands that might help
  8618.              simplify your computing life.  The following lists categorize
  8619.              the available commands by topic and will help you find the
  8620.              ones that you need.  Commands listed below with an asterisk
  8621.              [*] are not available in all command processors; see the list
  8622.              at the end for details.
  8623.  
  8624.              System configuration:
  8625.  
  8626.                BREAK *        CHCP *         CLS            COLOR
  8627.                CTTY *         DATE           FREE           HISTORY
  8628.                KEYS *         KEYBD          LH/LOADHIGH*   LOG
  8629.                MEMORY         PROMPT         REBOOT         SETDOS
  8630.                SWAPPING *     TIME           VER            VERIFY
  8631.                VOL
  8632.  
  8633.              File and directory management:
  8634.  
  8635.                ATTRIB         COPY           DEL/ERASE      DESCRIBE
  8636.                LIST           MOVE           REN/RENAME     SELECT
  8637.                TRUENAME *     TYPE
  8638.  
  8639.              Subdirectory management:
  8640.  
  8641.                CD/CHDIR       CDD            DIR            DIRS
  8642.                MD/MKDIR       POPD           PUSHD          RD/RMDIR
  8643.  
  8644.              Input and output:
  8645.  
  8646.                DRAWBOX        DRAWHLINE      DRAWVLINE      ECHO
  8647.                ECHOS          INKEY          INPUT          KEYSTACK *
  8648.                MSGBOX *       SCREEN         SCRPUT         TEXT
  8649.                VSCRPUT
  8650.  
  8651.              Commands primarily for use in or with batch files and aliases
  8652.              (some work only in batch files; see the individual commands
  8653.              for details):
  8654.  
  8655.                ALIAS          BEEP           CALL           CANCEL
  8656.                DELAY          DO             ENDLOCAL       FOR
  8657.                GLOBAL         GOSUB          GOTO           IF
  8658.                IFF            LOADBTM        ON             PAUSE
  8659.                QUIT           REM            RETURN         SETLOCAL
  8660.  
  8661.         -------------------------------------------------------------------
  8662.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 147
  8663.  
  8664.                                         CHAPTER 6 / COMMAND REFERENCE GUIDE
  8665.         -------------------------------------------------------------------
  8666.  
  8667.                SHIFT          TEXT           UNALIAS
  8668.  
  8669.              Environment and path commands:
  8670.  
  8671.                DPATH *        ESET           PATH           SET
  8672.                UNSET
  8673.  
  8674.              Window management commands:
  8675.  
  8676.                ACTIVATE *     TITLE *        WINDOW *
  8677.  
  8678.              Other commands:
  8679.  
  8680.                ?              DETACH *       EXCEPT         EXIT
  8681.                HELP           LIST           START          TEE
  8682.                TIMER          Y
  8683.  
  8684.              * Some of these commands are not included in one or more of
  8685.              our command processors.  Usually a command is left out of a
  8686.              product when it is not useful or cannot be implemented in that
  8687.              environment (for example, the DETACH command is related to
  8688.              multitasking, and is not available under DOS because DOS does
  8689.              not offer multitasking).  The commands that are specific to
  8690.              particular products are:
  8691.  
  8692.                ACTIVATE ....4DOS/NT           KEYSTACK .....4DOS
  8693.                BREAK .......4DOS, 4DOS/NT     LH/LOADHIGH ..4DOS
  8694.                CHCP ........4DOS, 4OS2        MSGBOX  ......4DOS/NT
  8695.                CTTY ........4DOS              SWAPPING .....4DOS
  8696.                DETACH ......4OS2, 4DOS/NT     TITLE ........4DOS/NT
  8697.                DPATH .......4OS2, 4DOS/NT     TRUENAME .....4DOS
  8698.                KEYS ........4OS2, 4DOS/NT     WINDOW .......4OS2, 4DOS/NT
  8699.  
  8700.  
  8701.         How to Use the Command Descriptions
  8702.  
  8703.              Each of the internal commands is described in detail on the
  8704.              following pages.  The descriptions are arranged
  8705.              alphabetically, and each includes examples that will help you
  8706.              learn to use the commands.
  8707.  
  8708.              Each description begins with the name of the command on the
  8709.              left side of the page.  If the command is only available in
  8710.              some of our products, those products are listed next to the
  8711.              command name, and in the page header.  Commands marked "New"
  8712.              on the right side of the page are unique to 4DOS, 4OS2, or
  8713.              4DOS/NT.  Those marked "Enhanced" are similar to traditional
  8714.              commands but add new features and options.  The commands
  8715.  
  8716.  
  8717.         -------------------------------------------------------------------
  8718.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 148
  8719.  
  8720.                                         CHAPTER 6 / COMMAND REFERENCE GUIDE
  8721.         -------------------------------------------------------------------
  8722.  
  8723.              marked "Compatible" follow the syntax and features of the
  8724.              traditional command with the same name.
  8725.  
  8726.              The name is followed by a sentence or two that briefly
  8727.              describes the command's purpose or major function.  That
  8728.              sentence should help you determine quickly whether you have
  8729.              found the command you are seeking.
  8730.  
  8731.              The next part of each description shows the command's format
  8732.              or syntax.  The format line uses certain conventions to
  8733.              describe how the command should be entered and to create
  8734.              reference points for the text describing the command:
  8735.  
  8736.                   Words in UPPER CASE must be spelled exactly as they are
  8737.                   shown (although you can type them in either upper or
  8738.                   lower case, or a combination).  If a word is shown partly
  8739.                   in upper case (for example BLInk), only the upper case
  8740.                   portion is required, the rest is optional.
  8741.  
  8742.                   Words shown in italics (for example source or filename)
  8743.                   are meant to be replaced by other words or values.  Each
  8744.                   of these words is explained directly beneath the format
  8745.                   line and discussed in more detail in the text description
  8746.                   of the command.  When the word stands for a file name,
  8747.                   you can use a simple name like MYFILE.TXT, or include a
  8748.                   drive letter and/or a full path, like
  8749.                   C:\MYDIR\MYFILE.TXT.
  8750.  
  8751.                   Items followed by an ellipsis (three periods [...]) may
  8752.                   be repeated.  For example, filename ... means you may
  8753.                   enter one or more file names at this point in the
  8754.                   command.
  8755.  
  8756.                   Text shown in [square brackets] is optional.  Text
  8757.                   outside of square brackets must be entered literally (if
  8758.                   it is capitalized) or replaced by other words or values
  8759.                   (if it is in italics).
  8760.  
  8761.                   Vertical bars [|] represent a choice; you can pick one
  8762.                   option or another but not both.  For example, the
  8763.                   following format shows that the command may be followed
  8764.                   by the word ON or the word OFF, but not both:
  8765.  
  8766.                        COMMAND [ ON | OFF ]
  8767.  
  8768.                   A slash followed by a letter, like [/X], is an "option"
  8769.                   or "switch" which controls the effect of a command.  Many
  8770.                   commands have several switches, and you are usually free
  8771.                   to use none, one, or several to make a command behave as
  8772.  
  8773.         -------------------------------------------------------------------
  8774.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 149
  8775.  
  8776.                                         CHAPTER 6 / COMMAND REFERENCE GUIDE
  8777.         -------------------------------------------------------------------
  8778.  
  8779.                   you wish.  If you use a single switch, you must precede
  8780.                   it with a slash.  If you use several switches, in most
  8781.                   cases you can put them together with one slash or use
  8782.                   separate slashes.  For example, if you wanted to use
  8783.                   switches X, Y, and Z for a command, you could type them
  8784.                   three different ways:
  8785.  
  8786.                        command /x /y /z
  8787.                        command /x/y/z
  8788.                        command /xyz
  8789.  
  8790.                   A few switches, particularly in the DIR, SELECT, and
  8791.                   START commands, use two or more characters.  If you need
  8792.                   to follow a multi-letter switch with another switch, the
  8793.                   second switch must have its own slash to avoid ambiguity.
  8794.  
  8795.              Included in the format section is an explanation of each
  8796.              replaceable argument and a one or two word explanation of each
  8797.              switch.  Many descriptions also list related commands to help
  8798.              you find the exact command you want.
  8799.  
  8800.              For file handling commands, a section called "File Select"
  8801.              appears immediately after the format section.  This section
  8802.              lists the file-handling features that the command supports.
  8803.              The list may include mention of extended wildcards (see page
  8804.              57); multiple file names (page 64); include lists (page 65);
  8805.              and date, time, and size ranges (see page 60).
  8806.  
  8807.              Next, you'll find a description of the command's usage.  This
  8808.              description normally starts with the basic functions of a
  8809.              command and gradually adds more details.  We've also included
  8810.              many examples to help you see the command in action.
  8811.  
  8812.              The last part of each description is a detailed explanation of
  8813.              the options or switches available for each command, in
  8814.              alphabetical order.  Occasionally, we've included more
  8815.              examples in this section to demonstrate how a switch is used
  8816.              or how multiple switches interact.
  8817.  
  8818.              Most of the commands and their switches have the same use in
  8819.              4DOS, 4OS2, and 4DOS/NT.  When a command, feature, or switch
  8820.              applies to a single product, we mention it specifically in the
  8821.              text.  When an entire paragraph applies to a specific product,
  8822.              we use marginal text to identify that product.  When an entire
  8823.  
  8824.  
  8825.  
  8826.  
  8827.         -------------------------------------------------------------------
  8828.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 150
  8829.  
  8830.                                         CHAPTER 6 / COMMAND REFERENCE GUIDE
  8831.         -------------------------------------------------------------------
  8832.  
  8833.              command is only available in one or two products, the products
  8834.              are listed next to the command name, and in the page headings.
  8835.  
  8836.      4DOS    marks information that applies only to 4DOS.
  8837.  
  8838.      4OS2    marks information that applies only to 4OS2.
  8839.  
  8840.      4NT     marks information that applies only to 4DOS/NT.
  8841.  
  8842.              Occasionally, a command or switch will be marked with two of
  8843.              these marginal notations when it applies to two different
  8844.              products.
  8845.  
  8846.              An exclamation point [!] to the left of a paragraph means that
  8847.              paragraph contains a caution or warning you should observe
  8848.              when using the feature it discusses.
  8849.  
  8850.              In the Usage and Options sections you may see the symbol## .
  8851.              This indicates a more in-depth discussion or an advanced topic
  8852.              which you can skip if you are new to the command; come back to
  8853.              this topic later for more details, or if you're having trouble
  8854.              with the command.  In most cases the remainder of the section
  8855.              after such a symbol is devoted to similar information.
  8856.  
  8857.              The ## doesn't mean that only advanced users will need the
  8858.              information - you may find it useful even if you're relatively
  8859.              new to computers or to our products.  But it does mean that
  8860.              you can skip the marked section and still understand and use
  8861.              the basic features of the command.  If a ## appears before the
  8862.              "Usage" heading, it indicates that the entire command is
  8863.              generally used only in unusual situations or by more advanced
  8864.              users.
  8865.  
  8866.              When you see a ## in the list of options, remember that the
  8867.              options are listed alphabetically, so there may be more basic
  8868.              options discussed later in the list, after a more complex or
  8869.              advanced option marked with## .  Don't stop reading the option
  8870.              list the first time you see the mark.
  8871.  
  8872.  
  8873.  
  8874.  
  8875.  
  8876.  
  8877.  
  8878.  
  8879.  
  8880.  
  8881.  
  8882.  
  8883.         -------------------------------------------------------------------
  8884.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 151
  8885.  
  8886.                                                                           ?
  8887.         -------------------------------------------------------------------
  8888.  
  8889.         ?                                                             (New)
  8890.  
  8891.         Purpose:    Display a list of internal commands.
  8892.  
  8893.         Format:     ?
  8894.  
  8895.         Usage:      ? displays a list of internal commands.  For help with
  8896.                     these commands, see the HELP command.
  8897.  
  8898.                     When you use the ? command, you will see a display
  8899.                     like this (the list below is for 4DOS; you will see a
  8900.                     slightly different list for 4OS2 or 4DOS/NT):
  8901.  
  8902.                          c:\> ?
  8903.                          ?            ALIAS       ATTRIB       BEEP
  8904.                          BREAK        CALL        CANCEL       CD
  8905.                          CDD          CHCP        CHDIR        CLS
  8906.                          COLOR        COPY        CTTY         DATE
  8907.                          DEL          DELAY       DESCRIBE     DIR
  8908.                          DIRS         DO          DRAWBOX      DRAWHLINE
  8909.                          DRAWVLINE    ECHO        ECHOS        ENDLOCAL
  8910.                          ERASE        ESET        EXCEPT       EXIT
  8911.                          FOR          FREE        GLOBAL       GOSUB
  8912.                          GOTO         HELP        HISTORY      IF
  8913.                          IFF          INKEY       INPUT        KEYBD
  8914.                          KEYSTACK     LH          LIST         LOADBTM
  8915.                          LOADHIGH     LOG         MD           MEMORY
  8916.                          MKDIR        MOVE        ON           PATH
  8917.                          PAUSE        POPD        PROMPT       PUSHD
  8918.                          QUIT         RD          REBOOT       REM
  8919.                          REN          RENAME      RETURN       RMDIR
  8920.                          SCREEN       SCRPUT      SELECT       SET
  8921.                          SETDOS       SETLOCAL    SHIFT        START
  8922.                          SWAPPING     TEE         TEXT         TIME
  8923.                          TIMER        TRUENAME    TYPE         UNALIAS
  8924.                          UNSET        VER         VERIFY       VOL
  8925.                          VSCRPUT      Y
  8926.  
  8927.                     If you have disabled a command with SETDOS /I, it will
  8928.                     not appear in the list.
  8929.  
  8930.  
  8931.  
  8932.  
  8933.  
  8934.  
  8935.  
  8936.  
  8937.  
  8938.  
  8939.         -------------------------------------------------------------------
  8940.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 153
  8941.  
  8942.                                                      [4DOS/NT]     ACTIVATE
  8943.         -------------------------------------------------------------------
  8944.  
  8945.         ACTIVATE     [4DOS/NT]                                        (New)
  8946.  
  8947.         Purpose:    Activate a window, set its state, or change its title.
  8948.  
  8949.         Format:     ACTIVATE "window" [MAX | MIN | RESTORE | CLOSE |
  8950.                     "title" ]
  8951.  
  8952.                     window:      Current title of window to work with.
  8953.                     title:       New title for window.
  8954.  
  8955.                     See also:  START, TITLE, and WINDOW.
  8956.  
  8957.         Usage:      Both the current name of the window and the new name,
  8958.                     if any, must be enclosed in double quotes.  The quotes
  8959.                     will not appear as part of the title bar text.
  8960.  
  8961.                     If no options are used, the window named in the
  8962.                     command will become the active window and be able to
  8963.                     receive keystrokes and mouse commands.
  8964.  
  8965.                     The MAX option expands the window to its maximum size,
  8966.                     the MIN option reduces the window to an icon, and the
  8967.                     RESTORE option returns the window to its default size
  8968.                     and location on the desktop.  The CLOSE option closes
  8969.                     the window and ends the session running in the window.
  8970.  
  8971.                     This example renames and maximizes the window called
  8972.                     "4DOS/NT":
  8973.  
  8974.                          [c:\] activate "4DOS/NT" max "4DOS/NT is Great!"
  8975.  
  8976.  
  8977.  
  8978.  
  8979.  
  8980.  
  8981.  
  8982.  
  8983.  
  8984.  
  8985.  
  8986.  
  8987.  
  8988.  
  8989.  
  8990.  
  8991.  
  8992.  
  8993.  
  8994.  
  8995.         -------------------------------------------------------------------
  8996.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 154
  8997.  
  8998.                                                                       ALIAS
  8999.         -------------------------------------------------------------------
  9000.  
  9001.         ALIAS                                                         (New)
  9002.  
  9003.         Purpose:    Create new command names that execute one or more
  9004.                     commands or redefine default options for existing
  9005.                     commands; assign commands to keystrokes; load or
  9006.                     display the list of defined alias names.
  9007.  
  9008.         Format:     ALIAS [/P /R file...] [name[=][value]]
  9009.  
  9010.                     file:        One or more files to read for alias
  9011.                                  definitions.
  9012.                     name:        Name for an alias, or for the key to
  9013.                                  execute the alias.
  9014.                     value:       Text to be substituted for the alias name.
  9015.  
  9016.                     /P(ause)                 /R(ead file)
  9017.  
  9018.                     See also:  UNALIAS, and Aliases on page 74.
  9019.  
  9020.         Usage:      The ALIAS command lets you create new command names or
  9021.                     redefine internal commands.  It also lets you assign
  9022.                     one or more commands to a single keystroke.  An alias
  9023.                     is often used to execute a complex series of commands
  9024.                     with a few keystrokes or to create "in memory batch
  9025.                     files" that run much faster than disk-based batch
  9026.                     files.
  9027.  
  9028.                     For example, if you would rather type D instead of DIR
  9029.                     /W, you would use the command:
  9030.  
  9031.                          c:\> alias d = dir /w
  9032.  
  9033.                     Now when you type a single d as a command, it will be
  9034.                     translated into a DIR /W command.
  9035.  
  9036.                     If you define aliases for commonly used application
  9037.                     programs, you can often remove the directories they're
  9038.                     stored in from the PATH.  For example, if you use
  9039.                     Quattro Pro and had the C:\QPRO directory in your
  9040.                     path, you could define the following alias:
  9041.  
  9042.                          c:\> alias qpro = c:\qpro\q.exe
  9043.  
  9044.                     With this alias defined, you can probably remove
  9045.                     C:\QPRO from your path.  Quattro Pro will now load
  9046.                     much faster than it would if the command processor had
  9047.                     to search the PATH for it.  In addition, the PATH can
  9048.                     be shorter, which will speed up searches for other
  9049.                     programs.
  9050.  
  9051.         -------------------------------------------------------------------
  9052.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 155
  9053.  
  9054.                                                                       ALIAS
  9055.         -------------------------------------------------------------------
  9056.  
  9057.                     If you apply this technique for each application
  9058.                     program, you can often reduce your PATH to just two or
  9059.                     three directories containing utility programs, and
  9060.                     significantly reduce the time it takes to load most
  9061.                     software on your system.  Before removing a directory
  9062.                     from the PATH, you will need to define aliases for all
  9063.                     the executable programs you commonly use which are
  9064.                     stored in that directory.
  9065.  
  9066.                     Aliases are stored in memory, and are not saved
  9067.                     automatically when you turn off your computer or end
  9068.                     your current session.  See page 161 for information on
  9069.                     saving and reloading your aliases.
  9070.  
  9071.  
  9072.                     Multiple Commands and Special Characters in Aliases
  9073.  
  9074.                     An alias can represent more than one command.  For
  9075.                     example:
  9076.  
  9077.                          c:\> alias letters = `cd \letters ^ text`
  9078.  
  9079.                     creates a new command called LETTERS.  The command
  9080.                     first uses CD to change to a subdirectory called
  9081.                     \LETTERS and then runs a program called TEXT.  The
  9082.                     caret [^] is the 4DOS command separator and indicates
  9083.                     that the two commands are distinct and should be
  9084.                     executed sequentially.  (The 4OS2 and 4DOS/NT command
  9085.                     separator is normally an ampersand [&].)
  9086.  
  9087.                     Aliases make extensive use of the command separator
  9088.                     (see page 45), and the parameter character (see page
  9089.                     134), and may also use the escape character (see page
  9090.                     71).  These characters differ between 4DOS and 4OS2 or
  9091.                     4DOS/NT.  In the text and examples below, we use the
  9092.                     4DOS characters.  The difference is also explained the
  9093.                     first time each character is used.  Be sure to insert
  9094.                     the correct characters for the command processor you
  9095.                     are using.  If you want to use the same aliases under
  9096.                     different command processors, see page 72.
  9097.  
  9098.                     When you type alias commands at the command line or in
  9099.                     a batch file, you must use back-quotes [`] around the
  9100.                     definition if it contains multiple commands,
  9101.                     parameters (discussed below), environment variables,
  9102.                     redirection, or piping.  The back-quotes prevent
  9103.                     premature expansion of these arguments.  You may use
  9104.                     back-quotes around other definitions, but they are not
  9105.                     required.  (You do not need back-quotes when your
  9106.  
  9107.         -------------------------------------------------------------------
  9108.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 156
  9109.  
  9110.                                                                       ALIAS
  9111.         -------------------------------------------------------------------
  9112.  
  9113.                     aliases are loaded from an ALIAS /R file; see below
  9114.                     for details.)  The examples above and below include
  9115.                     back-quotes only when they are required.
  9116.  
  9117.  
  9118.                     Nested Aliases
  9119.  
  9120.                     Aliases may invoke internal commands, external
  9121.                     commands, or other aliases.  (However, an alias may
  9122.                     not invoke itself, except in special cases where an IF
  9123.                     or IFF command is used to prevent an infinite loop.)
  9124.                     The two aliases below demonstrate alias nesting (one
  9125.                     alias invoking another).  The first line defines an
  9126.                     alias which runs a program called WP.EXE that is in
  9127.                     the E:\WP60\ subdirectory.  The second alias changes
  9128.                     directories with the PUSHD command, runs the WP alias,
  9129.                     and then returns to the original directory with the
  9130.                     POPD command:
  9131.  
  9132.                          c:\> alias wp = e:\wp60\wp.exe
  9133.                          c:\> alias w = `pushd c:\wp ^ wp ^ popd`
  9134.  
  9135.                     The second alias above could have included the full
  9136.                     path and name of the WP.EXE program instead of calling
  9137.                     the WP alias.  However, writing two aliases makes the
  9138.                     second one easier to read and understand, and makes
  9139.                     the first alias available for independent use.  If you
  9140.                     rename the WP.EXE program or move it to a new
  9141.                     directory, only the first alias needs to be changed.
  9142.  
  9143.  
  9144.                     Temporarily Disabling Aliases
  9145.  
  9146.                     If you put an asterisk [*] immediately before a
  9147.                     command in the value of an alias definition (the part
  9148.                     after the equal sign), it tells the command processor
  9149.                     not to attempt to interpret that command as another
  9150.                     (nested) alias.  An asterisk used this way must be
  9151.                     preceded by a space or the command separator and
  9152.                     followed immediately by an internal or external
  9153.                     command name.  The asterisk is used to signal that the
  9154.                     following word is the name of an internal or external
  9155.                     command instead of an alias which may have the same
  9156.                     name.  It also allows two popular uses of aliases.
  9157.  
  9158.                     First, by using an asterisk, you can redefine the
  9159.                     default options for any internal command.  For
  9160.                     example, suppose that you always want to use the DIR
  9161.                     command with the /2 (two column) and /P (pause at the
  9162.  
  9163.         -------------------------------------------------------------------
  9164.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 157
  9165.  
  9166.                                                                       ALIAS
  9167.         -------------------------------------------------------------------
  9168.  
  9169.                     end of each page) options.  The following line will do
  9170.                     just that:
  9171.  
  9172.                          c:\> alias dir = *dir /2/p
  9173.  
  9174.                     If you didn't include the asterisk, the second DIR on
  9175.                     the line would be the name of the alias itself, and
  9176.                     the command processor would repeatedly re-invoke the
  9177.                     DIR alias, rather than running the DIR command.  This
  9178.                     would cause an "Alias loop" or "Command line too long"
  9179.                     error.  The asterisk forces interpretation of the
  9180.                     second DIR as a command, not an alias.
  9181.  
  9182.                     Second, an asterisk also helps you keep the names of
  9183.                     internal commands from conflicting with the names of
  9184.                     external programs.  For example, suppose you have a
  9185.                     program called LIST.COM.  Normally, the internal LIST
  9186.                     command will run anytime you type LIST.  But two
  9187.                     simple aliases will give you access to both the
  9188.                     LIST.COM program and the LIST command:
  9189.  
  9190.                          c:\> alias list = c:\util\list.com
  9191.                          c:\> alias display = *list
  9192.  
  9193.                     The first line above defines LIST as an alias for the
  9194.                     LIST.COM program.  If you stopped there, the external
  9195.                     program would run every time you typed LIST and you
  9196.                     would not have easy access to the internal LIST
  9197.                     command.  The second line renames the internal LIST
  9198.                     command as DISPLAY.  The asterisk is needed in the
  9199.                     second command to indicate that the following word
  9200.                     means the internal command LIST, not the LIST alias
  9201.                     which runs your external program.
  9202.  
  9203.                     Another way to understand the asterisk is to remember
  9204.                     that a command is always checked for an alias first,
  9205.                     then for an internal or external command, or a batch
  9206.                     file (see page 116).  The asterisk at the beginning of
  9207.                     a command name simply skips over the usual check for
  9208.                     aliases when processing that command, and allows the
  9209.                     command processor to go straight to checking for an
  9210.                     internal command, external command, or batch file.
  9211.  
  9212.                     You can also use an asterisk before a command that you
  9213.                     enter at the command line or in a batch file.  If you
  9214.                     do, that command won't be interpreted as an alias.
  9215.                     This can be useful when you want to be sure you are
  9216.                     running the true, original command and not an alias
  9217.                     with the same name, or temporarily defeat the purpose
  9218.  
  9219.         -------------------------------------------------------------------
  9220.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 158
  9221.  
  9222.                                                                       ALIAS
  9223.         -------------------------------------------------------------------
  9224.  
  9225.                     of an alias which changes the meaning or behavior of a
  9226.                     command.  For example, above we defined an alias for
  9227.                     DIR which made directories display in 2-column paged
  9228.                     mode by default.  If you wanted to see a directory
  9229.                     display in the normal single-column, non-paged mode,
  9230.                     you could enter the command *DIR and the alias would
  9231.                     be ignored during that one command.
  9232.  
  9233.  
  9234.                     Partial Alias Names
  9235.  
  9236.                     You can also use an asterisk in the name of an alias.
  9237.                     When you do, the characters following the asterisk are
  9238.                     optional when you invoke the alias command.  (Use of
  9239.                     an asterisk in the alias name is unrelated to the use
  9240.                     of an asterisk in the alias value discussed above.)
  9241.                     For example, with this alias:
  9242.  
  9243.                          c:\> alias wher*eis = dir /sp
  9244.  
  9245.                     the new command, WHEREIS, can be invoked as WHER,
  9246.                     WHERE, WHEREI, or WHEREIS.  Now if you type:
  9247.  
  9248.                          c:\> where myfile.txt
  9249.  
  9250.                     The WHEREIS alias will be expanded to the command:
  9251.  
  9252.                          dir /sp myfile.txt
  9253.  
  9254.  
  9255.                     Keystroke Aliases
  9256.  
  9257.                     If you want to assign an alias to a keystroke, use the
  9258.                     keyname on the left side of the equal sign, preceded
  9259.                     by an at sign [@].  For example, to assign the command
  9260.                     DIR /W to the F5 key, type
  9261.  
  9262.                          c:\> alias @F5 = dir /w
  9263.  
  9264.                     See page 31 for a complete listing of key names and a
  9265.                     description of the key name format.
  9266.  
  9267.                     When you define keystroke aliases, the assignments
  9268.                     will only be in effect at the command line, not inside
  9269.                     application programs.  Be careful not to assign
  9270.                     aliases to keys that are already used at the command
  9271.                     line (like F1 for Help).  The command-line meanings
  9272.                     take precedence and the keystroke alias will never be
  9273.                     invoked.  If you want to use one of the command-line
  9274.  
  9275.         -------------------------------------------------------------------
  9276.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 159
  9277.  
  9278.                                                                       ALIAS
  9279.         -------------------------------------------------------------------
  9280.  
  9281.                     keys for an alias instead of its normal meaning, you
  9282.                     must first disable its regular use with the NormalKey
  9283.                     or NormalEditKey directive in your .INI file.  See
  9284.                     page 137 for instructions.
  9285.  
  9286.                     If you define a keystroke alias with a single at sign
  9287.                     as shown above, then, when you press the F5 key, the
  9288.                     value of the alias (DIR /W above) will be placed on
  9289.                     the command line for you.  You can type additional
  9290.                     parameters if you wish and then press Enter to execute
  9291.                     the command.  With this particular alias, you can
  9292.                     define the files that you want to display after
  9293.                     pressing F5 and before pressing Enter to execute the
  9294.                     command.
  9295.  
  9296.                     If you want the keystroke alias to take action
  9297.                     automatically without waiting for you to edit the
  9298.                     command line or press Enter, you can begin the
  9299.                     definition with two at signs [@@].  The command
  9300.                     processor will execute the alias "silently," without
  9301.                     displaying its text on the command line.  For example,
  9302.                     this command will assign an alias to the F6 key that
  9303.                     uses the CDD command to take you back to the previous
  9304.                     default directory:
  9305.  
  9306.                          c:\> alias @@f6 = cdd -
  9307.  
  9308.                  ## A second method can also be used to make a keystroke
  9309.                     alias execute immediately:  you can include a carriage
  9310.                     return character as the last character in the alias
  9311.                     definition.  When the command processor finds the
  9312.                     carriage return, it executes the alias just as if you
  9313.                     had pressed the Enter key.  Unlike the "@@" method
  9314.                     (above), this method will display the contents of the
  9315.                     alias on the screen.  If you use this method, do not
  9316.                     define the alias with a double at sign as well.  If
  9317.                     you do, the alias will not work properly.
  9318.  
  9319.                     To include the carriage return character, add an
  9320.                     escape character followed by an "r" to the end of the
  9321.                     alias (see page 71 for more information about the
  9322.                     escape character).  For example, you could write the
  9323.                     above alias as:
  9324.  
  9325.                          c:\> alias @f6 = `cdd --r`
  9326.  
  9327.                     (If you define your alias at the command line without
  9328.                     using back-quotes, you must use two escape characters
  9329.                     before the "r".  In 4DOS, the default escape character
  9330.  
  9331.         -------------------------------------------------------------------
  9332.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 160
  9333.  
  9334.                                                                       ALIAS
  9335.         -------------------------------------------------------------------
  9336.  
  9337.                     is Ctrl-X, shown above as an up-arrow [-]; in 4OS2 and
  9338.                     4DOS/NT, the default escape character is a caret [^].)
  9339.  
  9340.                  ## You can also define a keystroke alias by using "@" or
  9341.                     "@@" plus a scan code for one of the permissible keys
  9342.                     (see Appendix B on page 357 for a list of scan codes).
  9343.                     In most cases it will be easier to use key names.
  9344.                     Scan codes should only be used with unusual keyboards
  9345.                     where a key name is not available for the key you are
  9346.                     using.
  9347.  
  9348.  
  9349.                     Displaying Aliases
  9350.  
  9351.                     If you want to see a list of all current ALIAS
  9352.                     commands, type:
  9353.  
  9354.                          c:\> alias
  9355.  
  9356.                     You can also view the definition of a single alias.
  9357.                     If you want to see the definition of the alias LIST,
  9358.                     you can type:
  9359.  
  9360.                          c:\> alias list
  9361.  
  9362.  
  9363.                     Saving and Reloading Your Aliases
  9364.  
  9365.                     You can save your aliases to a file called ALIAS.LST
  9366.                     this way:
  9367.  
  9368.                          c:\> alias > alias.lst
  9369.  
  9370.                     You can then reload all the alias definitions in the
  9371.                     file the next time you boot up with the command:
  9372.  
  9373.                          c:\> alias /r alias.lst
  9374.  
  9375.                     This is much faster than defining each alias
  9376.                     individually in a batch file.  If you keep your alias
  9377.                     definitions in a separate file which you load when
  9378.                     your system starts, you can edit them with a text
  9379.                     editor, reload the edited file with ALIAS /R, and know
  9380.                     that the same alias list will be loaded the next time
  9381.                     you boot your computer.
  9382.  
  9383.                     When you define aliases in a file that will be read
  9384.                     with the ALIAS /R command, you do not need back-quotes
  9385.                     around the value, even if back-quotes would normally
  9386.  
  9387.         -------------------------------------------------------------------
  9388.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 161
  9389.  
  9390.                                                                       ALIAS
  9391.         -------------------------------------------------------------------
  9392.  
  9393.                     be required when defining the same alias at the
  9394.                     command line or in a batch file.
  9395.  
  9396.                     To remove an alias, use the UNALIAS command.
  9397.  
  9398.  
  9399.                     Alias Parameters
  9400.  
  9401.                  ## Aliases can use command-line arguments or parameters
  9402.                     like those in batch files.  The command-line arguments
  9403.                     are numbered from %0 to %127.  %0 contains the alias
  9404.                     name.  It is up to the alias to determine the meaning
  9405.                     of the other parameters.  You can use quotation marks
  9406.                     to pass spaces, tabs, commas, and other special
  9407.                     characters in an alias parameter; see page 118 for
  9408.                     details.
  9409.  
  9410.                     Parameters that are referred to in an alias, but which
  9411.                     are missing on the command line, appear as empty
  9412.                     strings inside the alias.  For example, if you put two
  9413.                     parameters on the command line, any reference in the
  9414.                     alias to %3 or any higher-numbered parameter will be
  9415.                     interpreted as an empty string.
  9416.  
  9417.                     The parameter %n& has a special meaning.  4DOS
  9418.                     interprets it to mean "the entire command line, from
  9419.                     argument n to the end."  If n is not specified, it has
  9420.                     a default value of 1, so %& means "the entire command
  9421.                     line after the alias name."  4OS2 and 4DOS/NT normally
  9422.                     use a dollar sign [$] instead of an ampersand [&] to
  9423.                     indicate the remainder of the command tail (for
  9424.                     example, use %$ to refer to all parameters under 4OS2
  9425.                     or 4DOS/NT).  The special parameter %# contains the
  9426.                     number of command-line arguments.
  9427.  
  9428.                     For example, the following alias will change
  9429.                     directories, perform a command, and return to the
  9430.                     original directory:
  9431.  
  9432.                          c:\> alias in `pushd %1 ^ %2& ^ popd`
  9433.  
  9434.                     When this alias is invoked as:
  9435.  
  9436.                          c:\> in c:\comm mycomm /xmodem /2400
  9437.  
  9438.                     the first parameter, %1, has the value c:\comm.  %2 is
  9439.                     mycomm, %3 is /xmodem, and %4 is /2400.  The command
  9440.                     line expands into these three separate commands:
  9441.  
  9442.  
  9443.         -------------------------------------------------------------------
  9444.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 162
  9445.  
  9446.                                                                       ALIAS
  9447.         -------------------------------------------------------------------
  9448.  
  9449.                          pushd c:\comm
  9450.                          mycomm /xmodem /2400
  9451.                          popd
  9452.  
  9453.                  ## This next example uses the IFF command to redefine the
  9454.                     defaults for SET.  It should be entered on one line:
  9455.  
  9456.                          c:\> alias set = `iff %# == 0 then ^ *set /p
  9457.                               ^ else ^ *set %& ^ endiff`
  9458.  
  9459.                     This modifies the SET command so that if SET is
  9460.                     entered with no arguments, it is replaced by SET /P
  9461.                     (pause after displaying each page), but if SET is
  9462.                     followed by an argument, it behaves normally.  Note
  9463.                     the use of asterisks (*set) to prevent alias loops.
  9464.  
  9465.                  ## If an alias uses parameters, command-line arguments
  9466.                     will be deleted up to and including the highest
  9467.                     referenced argument.  For example, if an alias refers
  9468.                     only to %1 and %4, then the first and fourth arguments
  9469.                     will be used, the second and third arguments will be
  9470.                     discarded, and any additional arguments beyond the
  9471.                     fourth will be appended to the expanded command (after
  9472.                     the value portion of the alias).  If an alias uses no
  9473.                     parameters, all of the command-line arguments will be
  9474.                     appended to the expanded command.
  9475.  
  9476.                  ## Aliases also have full access to all variables in the
  9477.                     environment, internal variables, and variable
  9478.                     functions.  For example, you can create a simple
  9479.                     command-line calculator this way (enter this on one
  9480.                     line):
  9481.  
  9482.                          c:\> alias calc = `echo The answer is:
  9483.                          %@eval[%&]`
  9484.  
  9485.                     Now, if you enter:
  9486.  
  9487.                          c:\> calc 5 * 6
  9488.  
  9489.                     the alias will display:
  9490.  
  9491.                          The answer is: 30
  9492.  
  9493.  
  9494.                  ## Local and Global Aliases
  9495.  
  9496.                     The aliases can be stored in either a "local" or
  9497.                     "global" list.
  9498.  
  9499.         -------------------------------------------------------------------
  9500.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 163
  9501.  
  9502.                                                                       ALIAS
  9503.         -------------------------------------------------------------------
  9504.  
  9505.                     With a local alias list, any changes made to the
  9506.                     aliases will only affect the current copy of the
  9507.                     command processor.  They will not be visible in other
  9508.                     shells or other sessions.  A local alias list is the
  9509.                     default under 4DOS.
  9510.  
  9511.                     With a global alias list, all copies of the command
  9512.                     processor will share the same alias list, and any
  9513.                     changes made to the aliases in one copy will affect
  9514.                     all other copies.  A global alias list is the default
  9515.                     for 4OS2 and 4DOS/NT.
  9516.  
  9517.                     You can control the type of alias list with the
  9518.                     LocalAliases directive in the .INI file (see page
  9519.                     128), and with the /L and /LA options of the START
  9520.                     command (see page 317).
  9521.  
  9522.                     There is no fixed rule for determining whether to use
  9523.                     a local or global alias list.  Depending on your work
  9524.                     style, you may find it most convenient to use one
  9525.                     type, or a mixture of types in different sessions or
  9526.                     shells.  We recommend that you start with the default
  9527.                     approach for your command processor, then modify it if
  9528.                     you find a situation where the default is not
  9529.                     convenient.
  9530.  
  9531.                     Whenever you start a secondary shell (see page 12)
  9532.                     which uses a local alias list, it inherits a copy of
  9533.                     the aliases from the previous shell.  However, any
  9534.                     changes to the alias made in the secondary shell will
  9535.                     affect only that shell.  If you want changes made in a
  9536.                     secondary shell to affect the previous shell, use a
  9537.                     global alias list in both shells.
  9538.  
  9539.            4DOS     If you select a global alias list for 4DOS running
  9540.                     under DOS, you can share the aliases among all copies
  9541.                     of 4DOS.  However, if you run 4DOS under OS/2, global
  9542.                     lists will apply within each DOS session, but will not
  9543.                     allow you to share aliases between different DOS
  9544.                     sessions.
  9545.  
  9546.  
  9547.             4OS2 ## Retaining Global Aliases with SHRALIAS
  9548.             4NT
  9549.                     If you select a global alias list for 4OS2 or 4DOS/NT,
  9550.                     you can share the aliases among all copies of the
  9551.                     command processor running in any session.  When you
  9552.                     close all 4OS2 or 4DOS/NT sessions, the memory for the
  9553.                     global alias list is released, and a new, empty alias
  9554.  
  9555.         -------------------------------------------------------------------
  9556.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 164
  9557.  
  9558.                                                                       ALIAS
  9559.         -------------------------------------------------------------------
  9560.  
  9561.                     list is created the next time you start 4OS2 or
  9562.                     4DOS/NT.
  9563.  
  9564.                     If you want the alias list to be retained in memory
  9565.                     even when no command processor session is running, you
  9566.                     need to load the SHRALIAS program, which performs this
  9567.                     service for both the global alias list and the global
  9568.                     history list.  SHRALIAS is supplied with your copy of
  9569.                     4OS2 or 4DOS/NT.
  9570.  
  9571.                     To load SHRALIAS, simply run the SHRALIAS.EXE program,
  9572.                     which is normally installed in the same directory as
  9573.                     your command processor.  You may find it convenient to
  9574.                     load SHRALIAS from your 4START file (see page 82), or,
  9575.                     under OS/2, from your STARTUP.CMD (see your 4OS2
  9576.                     Introduction and Installation Guide for details on
  9577.                     STARTUP.CMD).
  9578.  
  9579.                     If you try to load SHRALIAS when there is no 4OS2 or
  9580.                     4DOS/NT session running with a global alias or history
  9581.                     list enabled, then SHRALIAS will not be able to find
  9582.                     the lists.  In this case it will display an error
  9583.                     message and exit.  If you load SHRALIAS more than
  9584.                     once, the second copy will detect the original copy,
  9585.                     display an error message, and exit.  The original copy
  9586.                     will remain loaded.
  9587.  
  9588.                     SHRALIAS runs as a "detached" process, which means it
  9589.                     does not have a screen display or accept keyboard
  9590.                     input.  It is shut down automatically when the
  9591.                     operating system shuts down.  To unload SHRALIAS
  9592.                     manually, run SHRALIAS.EXE with the parameter /U.
  9593.  
  9594.  
  9595.                  ## The UNKNOWN_CMD Alias
  9596.  
  9597.                     If you create an alias with the name UNKNOWN_CMD, it
  9598.                     will be executed any time the command processor would
  9599.                     normally issue an "Unknown command" error message.
  9600.                     This allows you to define your own handler for unknown
  9601.                     commands.  When the UNKNOWN_CMD alias is executed, the
  9602.                     command line which generated the error is passed to
  9603.                     the alias for possible processing.
  9604.  
  9605.                  !  Use caution when you create the UNKNOWN_CMD alias.  If
  9606.                     it contains an unknown command, it will be called
  9607.                     repeatedly and the command processor will lock up in
  9608.                     an infinite loop.
  9609.  
  9610.  
  9611.         -------------------------------------------------------------------
  9612.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 165
  9613.  
  9614.                                                                       ALIAS
  9615.         -------------------------------------------------------------------
  9616.  
  9617.         Options:    /P(ause):  This option is only effective when ALIAS is
  9618.                     used to display existing definitions.  It pauses the
  9619.                     display after each page and waits for a keystroke
  9620.                     before continuing (see page 48).
  9621.  
  9622.                     /R(ead file):  This option loads an alias list from a
  9623.                     file.  The format of the file is the same as that of
  9624.                     the ALIAS display:
  9625.  
  9626.                               name=value
  9627.  
  9628.                     where name is the name of the alias and value is its
  9629.                     value.  You can use an equal sign [=] or space to
  9630.                     separate the name and value.  Back-quotes are not
  9631.                     required around the value.  You can add comments to
  9632.                     the file by starting each comment line with a colon
  9633.                     [:].  You can load multiple files with one ALIAS /R
  9634.                     command by placing the names on the command line,
  9635.                     separated by spaces:
  9636.  
  9637.                          c:\> alias /r alias1.lst alias2.lst
  9638.  
  9639.                     Each definition in an ALIAS /R file can be up to 511
  9640.                     characters long in 4DOS, or 2047 characters in 4OS2
  9641.                     and 4DOS/NT.  The definitions can span multiple lines
  9642.                     in the file if each line, except the last, is
  9643.                     terminated with an escape character (see page 71).
  9644.  
  9645.  
  9646.  
  9647.  
  9648.  
  9649.  
  9650.  
  9651.  
  9652.  
  9653.  
  9654.  
  9655.  
  9656.  
  9657.  
  9658.  
  9659.  
  9660.  
  9661.  
  9662.  
  9663.  
  9664.  
  9665.  
  9666.  
  9667.         -------------------------------------------------------------------
  9668.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 166
  9669.  
  9670.                                                                      ATTRIB
  9671.         -------------------------------------------------------------------
  9672.  
  9673.         ATTRIB                                                   (Enhanced)
  9674.  
  9675.         Purpose:    Change or view file and subdirectory attributes.
  9676.  
  9677.         Format:     ATTRIB [/D /P /Q /S] [+|-[AHRS]] files ...
  9678.  
  9679.                     files:       A file, directory, or list of files or
  9680.                                  directories on which to operate.
  9681.  
  9682.                     /D(irectories)           /Q(uiet)
  9683.                     /P(ause)                 /S(ubdirectories)
  9684.  
  9685.                     Attribute flags:
  9686.  
  9687.                          +A      Set the archive attribute
  9688.                          -A      Clear the archive attribute
  9689.                          +H      Set the hidden attribute
  9690.                          -H      Clear the hidden attribute
  9691.                          +R      Set the read-only attribute
  9692.                          -R      Clear the read-only attribute
  9693.                          +S      Set the system attribute
  9694.                          -S      Clear the system attribute
  9695.  
  9696.         File Select:Supports extended wildcards, ranges, multiple file
  9697.                     names, and include lists (see pages 57 - 65).
  9698.  
  9699.         Usage:      Every file and subdirectory has 4 attributes that can
  9700.                     be turned on (set) or turned off (cleared):  Archive,
  9701.                     Hidden, Read-only, and System.  For details on the
  9702.                     meaning of each attribute, see page 18.
  9703.  
  9704.                     The ATTRIB command lets you set or clear attributes
  9705.                     for any file, group of files, or subdirectory.  You
  9706.                     can view file attributes by entering ATTRIB without
  9707.                     specifying new attributes (i.e., without the [+|-
  9708.                     [AHRS]] part of the format), or with the DIR /T
  9709.                     command.
  9710.  
  9711.                     For example, you can set the read-only and hidden
  9712.                     attributes for the file MEMO:
  9713.  
  9714.                          c:\> attrib +rh memo
  9715.  
  9716.                     Attribute options apply to the file(s) that follow the
  9717.                     options on the ATTRIB command line.  The example below
  9718.                     shows how to set different attributes on different
  9719.                     files with a single command.  It sets the archive
  9720.                     attribute for all .TXT files, then sets the system
  9721.  
  9722.  
  9723.         -------------------------------------------------------------------
  9724.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 167
  9725.  
  9726.                                                                      ATTRIB
  9727.         -------------------------------------------------------------------
  9728.  
  9729.                     attribute and clears the archive attribute for
  9730.                     TEST.COM:
  9731.  
  9732.                          c:\> attrib +a *.txt +s -a test.com
  9733.  
  9734.                  ## Your operating system also supports "D" (subdirectory)
  9735.                     and "V" (volume label) attributes.  These attributes
  9736.                     cannot be altered with ATTRIB; they are designed to be
  9737.                     controlled only by the operating system itself.
  9738.  
  9739.         Options:    /D(irectories):  If you use the /D option, ATTRIB will
  9740.                     modify the attributes of subdirectories in addition to
  9741.                     files (yes, you can have a hidden subdirectory):
  9742.  
  9743.                          c:\> attrib /d +h c:\mydir
  9744.  
  9745.                     In addition, the /D option will keep ATTRIB from
  9746.                     appending "\*.*" to the end of a directory name and
  9747.                     modifying the attributes of all the files in the
  9748.                     subdirectory.
  9749.  
  9750.                     If you use a directory name instead of a file name,
  9751.                     and omit /D, ATTRIB will append "\*.*" to the end of
  9752.                     the name and act on all files in that directory,
  9753.                     rather than acting on the directory itself.
  9754.  
  9755.                     /P(ause):  Wait for a key to be pressed after each
  9756.                     screen page before continuing the display.  Your
  9757.                     options at the prompt are explained in detail on page
  9758.                     48.
  9759.  
  9760.                     /Q(uiet):  This option turns off ATTRIB's normal
  9761.                     screen output.  It is most useful in batch files.
  9762.  
  9763.                     /S(ubdirectories):  If you use the /S option, the
  9764.                     ATTRIB command will be applied to all matching files
  9765.                     in the current or named directory and all of its
  9766.                     subdirectories.
  9767.  
  9768.  
  9769.  
  9770.  
  9771.  
  9772.  
  9773.  
  9774.  
  9775.  
  9776.  
  9777.  
  9778.  
  9779.         -------------------------------------------------------------------
  9780.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 168
  9781.  
  9782.                                                                        BEEP
  9783.         -------------------------------------------------------------------
  9784.  
  9785.         BEEP                                                          (New)
  9786.  
  9787.         Purpose:    Beep the speaker or play simple music.
  9788.  
  9789.         Format:     BEEP [frequency duration ...]
  9790.  
  9791.                     frequency:   The beep frequency in Hertz (cycles per
  9792.                                  second).
  9793.                     duration:    The beep length in 1/18th second
  9794.                                  intervals.
  9795.  
  9796.         Usage:      BEEP generates a sound through your computer's
  9797.                     speaker.  It is normally used in batch files to signal
  9798.                     that an operation has been completed, or that the
  9799.                     computer needs attention.
  9800.  
  9801.                     Because BEEP allows you to specify the frequency and
  9802.                     duration of the sound, you can also use it to play
  9803.                     simple music or to create different kinds of signals
  9804.                     for the user.
  9805.  
  9806.                     You can include as many frequency and duration pairs
  9807.                     as you wish.  No sound will be generated for
  9808.                     frequencies less than 20 Hz, allowing you to insert
  9809.                     short delays.  The default value for frequency is 440
  9810.                     Hz; the default value for duration is 2.
  9811.  
  9812.                     This batch file fragment runs a program called DEMO,
  9813.                     then plays a few notes and waits for you to press a
  9814.                     key:
  9815.  
  9816.                          demo ^ beep 440 4  600 2  1040 6
  9817.                          pause Finished with the demo - hit a key...
  9818.  
  9819.                     The following table gives the frequency values for a
  9820.                     five octave range (middle C is 262 Hz):
  9821.  
  9822.  
  9823.                          C      131   262   523   1046  2093
  9824.  
  9825.                          C#/Db  139   277   554   1108  2217
  9826.  
  9827.                          D      147   294   587   1174  2349
  9828.  
  9829.                          D#/Eb  156   311   622   1244  2489
  9830.  
  9831.                          E      165   330   659   1318  2637
  9832.  
  9833.  
  9834.  
  9835.         -------------------------------------------------------------------
  9836.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 169
  9837.  
  9838.                                                                        BEEP
  9839.         -------------------------------------------------------------------
  9840.  
  9841.  
  9842.                          F      175   349   698   1397  2794
  9843.  
  9844.                          F#/Gb  185   370   740   1480  2960
  9845.  
  9846.                          G      196   392   784   1568  3136
  9847.  
  9848.                          G#/Ab  208   415   831   1662  3322
  9849.  
  9850.                          A      220   440   880   1760  3520
  9851.  
  9852.                          A#/Bb  233   466   932   1864  3729
  9853.  
  9854.                          B      248   494   988   1976  3951
  9855.  
  9856.  
  9857.  
  9858.  
  9859.  
  9860.  
  9861.  
  9862.  
  9863.  
  9864.  
  9865.  
  9866.  
  9867.  
  9868.  
  9869.  
  9870.  
  9871.  
  9872.  
  9873.  
  9874.  
  9875.  
  9876.  
  9877.  
  9878.  
  9879.  
  9880.  
  9881.  
  9882.  
  9883.  
  9884.  
  9885.  
  9886.  
  9887.  
  9888.  
  9889.  
  9890.  
  9891.         -------------------------------------------------------------------
  9892.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 170
  9893.  
  9894.                                                   [4DOS, 4DOS/NT]     BREAK
  9895.         -------------------------------------------------------------------
  9896.  
  9897.         BREAK        [4DOS, 4DOS/NT]                           (Compatible)
  9898.  
  9899.         Purpose:    Display, enable, or disable Ctrl-C and Ctrl-Break
  9900.                     checking.
  9901.  
  9902.         Format:     BREAK [ON | OFF]
  9903.  
  9904.         Usage:      The Ctrl-C and Ctrl-Break keys are used by many
  9905.                     programs (including 4DOS) as a signal to interrupt the
  9906.                     current operation.  BREAK controls how often DOS
  9907.                     checks to see if you've entered one of these
  9908.                     keystrokes.
  9909.  
  9910.              4NT    Ctrl-C and Ctrl-Break checking cannot actually be
  9911.                     enabled or disabled under Windows NT.  4DOS/NT
  9912.                     supports BREAK as a "do-nothing" command, for
  9913.                     compatibility with CMD.EXE.  This avoids errors in
  9914.                     batch files which use the BREAK command.  The
  9915.                     additional discussion below applies only to 4DOS, not
  9916.                     to 4DOS/NT.
  9917.  
  9918.                     Normally, BREAK is turned off, and DOS only checks for
  9919.                     Ctrl-C and Ctrl-Break keystrokes during DOS input or
  9920.                     output operations involving the screen, keyboard,
  9921.                     serial port, and printer.  However, many programs
  9922.                     don't use DOS for these operations, and it can be
  9923.                     difficult to interrupt them.
  9924.  
  9925.                     When BREAK is turned on, DOS checks for Ctrl-C and
  9926.                     Ctrl-Break every time a program calls DOS.  Since most
  9927.                     programs use DOS to access files and perform other
  9928.                     functions, turning BREAK on makes it much more likely
  9929.                     that a Ctrl-C or Ctrl-Break will be noticed.  If you
  9930.                     turn BREAK on, programs will run slightly slower than
  9931.                     normal (the difference is not usually noticeable).
  9932.  
  9933.                     Turning BREAK on or off only affects when DOS detects
  9934.                     Ctrl-C and Ctrl-Break and notifies the program you're
  9935.                     running.  Any program can choose to ignore these
  9936.                     signals.  Also, any external program can change the
  9937.                     BREAK setting on its own.
  9938.  
  9939.                     Type BREAK plus ON or OFF to set the BREAK status, or
  9940.                     BREAK by itself to display the current BREAK status.
  9941.                     For example:
  9942.  
  9943.                          c:\> break on
  9944.                          c:\> break
  9945.                          BREAK is ON
  9946.  
  9947.         -------------------------------------------------------------------
  9948.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 171
  9949.  
  9950.                                                   [4DOS, 4DOS/NT]     BREAK
  9951.         -------------------------------------------------------------------
  9952.  
  9953.                     BREAK is off by default.  You can change the default
  9954.                     by adding a BREAK=ON command to your CONFIG.SYS file.
  9955.  
  9956.  
  9957.  
  9958.  
  9959.  
  9960.  
  9961.  
  9962.  
  9963.  
  9964.  
  9965.  
  9966.  
  9967.  
  9968.  
  9969.  
  9970.  
  9971.  
  9972.  
  9973.  
  9974.  
  9975.  
  9976.  
  9977.  
  9978.  
  9979.  
  9980.  
  9981.  
  9982.  
  9983.  
  9984.  
  9985.  
  9986.  
  9987.  
  9988.  
  9989.  
  9990.  
  9991.  
  9992.  
  9993.  
  9994.  
  9995.  
  9996.  
  9997.  
  9998.  
  9999.  
  10000.  
  10001.  
  10002.  
  10003.         -------------------------------------------------------------------
  10004.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 172
  10005.  
  10006.                                                                        CALL
  10007.         -------------------------------------------------------------------
  10008.  
  10009.         CALL                                                   (Compatible)
  10010.  
  10011.         Purpose:    Execute one batch file from within another.
  10012.  
  10013.         Format:     CALL file
  10014.  
  10015.                     file:        The batch file to execute.
  10016.  
  10017.                     See also CANCEL and QUIT.
  10018.  
  10019.         Usage:      CALL allows batch files to call other batch files
  10020.                     (batch file nesting).  The calling batch file is
  10021.                     suspended while the called (second) batch file runs.
  10022.                     When the second batch file finishes, the original
  10023.                     batch file resumes execution at the next command.  If
  10024.                     you execute a batch file from inside another batch
  10025.                     file without using CALL, the first batch file is
  10026.                     terminated before the second one starts.
  10027.  
  10028.                     The following batch file fragment compares an input
  10029.                     line to "wp" and calls another batch file if it
  10030.                     matches:
  10031.  
  10032.                          input  Enter your choice:  %%option
  10033.                          if "%option" == "wp" call wp.bat
  10034.  
  10035.                     4DOS, 4OS2, and 4DOS/NT support batch file nesting up
  10036.                     to ten levels deep.
  10037.  
  10038.                     The current ECHO state is inherited by a called batch
  10039.                     file.
  10040.  
  10041.                  ## A called batch file will return to the calling file
  10042.                     after processing the last line in the called file, or
  10043.                     when a QUIT command is executed.  A called batch file
  10044.                     should always return in this way, or terminate all
  10045.                     batch files with CANCEL.  Restarting (or CALLing) the
  10046.                     original batch file from within a called file will
  10047.                     prevent the command processor from detecting that
  10048.                     you've left the second file, and it may cause an
  10049.                     infinite loop or a stack overflow.
  10050.  
  10051.                  ## CALL returns an exit code which matches the batch file
  10052.                     return code.  You can test this exit code with the %_?
  10053.                     or %? environment variable (see page 99), and use it
  10054.                     with conditional commands (&& and ||; see page 68).
  10055.  
  10056.  
  10057.  
  10058.  
  10059.         -------------------------------------------------------------------
  10060.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 173
  10061.  
  10062.                                                                      CANCEL
  10063.         -------------------------------------------------------------------
  10064.  
  10065.         CANCEL                                                        (New)
  10066.  
  10067.         Purpose:    Terminate batch file processing.
  10068.  
  10069.         Format:     CANCEL  [value]
  10070.  
  10071.                     value:  The exit code from 0 to 255 to return to the
  10072.                     command processor.
  10073.  
  10074.                     See also:  CALL and QUIT.
  10075.  
  10076.         Usage:      The CANCEL command ends all batch file processing,
  10077.                     regardless of the batch file nesting level.  Use QUIT
  10078.                     to end a nested batch file and return to the previous
  10079.                     batch file.
  10080.  
  10081.                     You can CANCEL at any point in a batch file.  If
  10082.                     CANCEL is used from within an alias it will end
  10083.                     execution of both the alias and any batch file(s)
  10084.                     which are running at the time.
  10085.  
  10086.                     The following batch file fragment compares an input
  10087.                     line to "end" and terminates all batch file processing
  10088.                     if it matches:
  10089.  
  10090.                          input Enter your choice:  %%option
  10091.                          if "%option" == "end" cancel
  10092.  
  10093.                  ## If you specify a value, CANCEL will set the ERRORLEVEL
  10094.                     or exit code to that value (see the IF command, and
  10095.                     the %? variable on page 99).
  10096.  
  10097.  
  10098.  
  10099.  
  10100.  
  10101.  
  10102.  
  10103.  
  10104.  
  10105.  
  10106.  
  10107.  
  10108.  
  10109.  
  10110.  
  10111.  
  10112.  
  10113.  
  10114.  
  10115.         -------------------------------------------------------------------
  10116.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 174
  10117.  
  10118.                                                                  CD / CHDIR
  10119.         -------------------------------------------------------------------
  10120.  
  10121.         CD / CHDIR                                               (Enhanced)
  10122.  
  10123.         Purpose:    Display or change the current directory.
  10124.  
  10125.         Format:     CD [ path | - ]
  10126.                          or
  10127.                     CHDIR [ path | - ]
  10128.  
  10129.                     path:        The directory to change to, including an
  10130.                                  optional drive name.
  10131.  
  10132.                     See also:  CDD, MD, PUSHD, RD, and Directory Changes
  10133.                     on page 43.
  10134.  
  10135.         Usage:      CD and CHDIR are synonyms.  You can use either one.
  10136.  
  10137.                     CD lets you navigate through the DOS subdirectory
  10138.                     structure by changing the current working directory.
  10139.                     If you enter CD and a directory name, the named
  10140.                     directory becomes the new current directory.  For
  10141.                     example, to change to the subdirectory
  10142.                     C:\FINANCE\MYFILES:
  10143.  
  10144.                          c:\> cd \finance\myfiles
  10145.                          c:\finance\myfiles>
  10146.  
  10147.                     Every disk drive on the system has its own current
  10148.                     directory.  Specifying both a drive and a directory in
  10149.                     the CD command will change the current directory on
  10150.                     the specified drive, but will not change the default
  10151.                     drive.  For example, to change the default directory
  10152.                     on drive A:
  10153.  
  10154.                          c:\> cd a:\utility
  10155.                          c:\>
  10156.  
  10157.                     Notice that this command does not change to drive A:.
  10158.                     Use the CDD command to change the current drive and
  10159.                     directory at the same time.
  10160.  
  10161.                     You can change to the parent directory with CD ..; you
  10162.                     can also go up one additional directory level with
  10163.                     each additional [.].  For example, CD .... will go up
  10164.                     three levels in the directory tree (see page 57 for
  10165.                     additional details).  You can move to a sibling
  10166.                     directory - one that branches from the same parent
  10167.                     directory as the current subdirectory - with a command
  10168.                     like CD ..\newdir.
  10169.  
  10170.  
  10171.         -------------------------------------------------------------------
  10172.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 175
  10173.  
  10174.                                                                  CD / CHDIR
  10175.         -------------------------------------------------------------------
  10176.  
  10177.                     If you enter CD with no argument or with only a disk
  10178.                     drive name, it will display the current directory on
  10179.                     the default or named drive.
  10180.  
  10181.                     CD saves the current directory before changing to a
  10182.                     new directory.  You can switch back to the previous
  10183.                     directory by entering CD -.  (There must be a space
  10184.                     between the CD command and the hyphen.)  You can
  10185.                     switch back and forth between two directories by
  10186.                     repeatedly entering CD -.  The saved directory is the
  10187.                     same for both the CD and CDD commands.  Drive changes
  10188.                     and automatic directory changes (see page 44) also
  10189.                     modify the saved directory, so you can use CD - to
  10190.                     return to a directory that you exited with an
  10191.                     automatic directory change.
  10192.  
  10193.                     Directory changes made with CD are recorded for
  10194.                     display in the directory history window (see page 43).
  10195.  
  10196.                  ## CD never changes the default drive.  If you change
  10197.                     directories on one drive, switch to another drive, and
  10198.                     then enter CD -, the directory will be restored on the
  10199.                     first drive but the current drive will not be changed.
  10200.  
  10201.                  ## If CD can't change to the specified directory, it will
  10202.                     look for the CDPATH environment variable.  See page 43
  10203.                     for details about using CDPATH.
  10204.  
  10205.                     The operating system limits the permissible length of
  10206.                     the full subdirectory name.  See page 15 for more
  10207.                     information on directory names.
  10208.  
  10209.  
  10210.  
  10211.  
  10212.  
  10213.  
  10214.  
  10215.  
  10216.  
  10217.  
  10218.  
  10219.  
  10220.  
  10221.  
  10222.  
  10223.  
  10224.  
  10225.  
  10226.  
  10227.         -------------------------------------------------------------------
  10228.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 176
  10229.  
  10230.                                                                         CDD
  10231.         -------------------------------------------------------------------
  10232.  
  10233.         CDD                                                           (New)
  10234.  
  10235.         Purpose:    Change the current disk drive and directory.
  10236.  
  10237.         Format:     CDD path
  10238.  
  10239.                     path:        The name of the directory (or drive and
  10240.                                  directory) to change to.
  10241.  
  10242.                     See also:  CD, MD, PUSHD, RD, and Directory Changes on
  10243.                     page 43.
  10244.  
  10245.         Usage:      CDD is similar to the CD command, except that it also
  10246.                     changes the default disk drive if one is specified.
  10247.                     CDD will change to the directory and drive you name.
  10248.                     To change from the root directory on drive A to the
  10249.                     subdirectory C:\WP:
  10250.  
  10251.                          a:\> cdd c:\wp
  10252.                          c:\wp>
  10253.  
  10254.                     You can change to the parent directory with CDD ..;
  10255.                     you can also go up one additional directory level with
  10256.                     each additional [.].  For example, CDD .... will go up
  10257.                     three levels in the directory tree.
  10258.  
  10259.                     CDD saves the current drive and directory before
  10260.                     changing to a new directory.  You can switch back to
  10261.                     the previous drive and directory by entering CDD -.
  10262.                     (There must be a space between the CDD command and the
  10263.                     hyphen.)  You can switch back and forth between two
  10264.                     drives and directories by repeatedly entering CDD -.
  10265.                     The saved directory is the same for both the CD and
  10266.                     CDD commands.  Drive changes and automatic directory
  10267.                     changes (see page 44) also modify the saved directory,
  10268.                     so you can use CDD - to return to a directory that you
  10269.                     exited with a drive change or an automatic directory
  10270.                     change.
  10271.  
  10272.                     Directory changes made with CDD are recorded for
  10273.                     display in the directory history window (see page 43).
  10274.  
  10275.                  ## If CDD can't change to the specified directory, it
  10276.                     will look for the CDPATH environment variable.  See
  10277.                     page 43 for details about using CDPATH.
  10278.  
  10279.                     The operating system limits the permissible length of
  10280.                     the full subdirectory name.  See page 15 for more
  10281.                     information on directory names.
  10282.  
  10283.         -------------------------------------------------------------------
  10284.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 177
  10285.  
  10286.                                                       [4DOS, 4OS2]     CHCP
  10287.         -------------------------------------------------------------------
  10288.  
  10289.         CHCP         [4DOS, 4OS2]                              (Compatible)
  10290.  
  10291.         Purpose:    Display or change the current system code page.
  10292.  
  10293.         Format:     CHCP [n]
  10294.  
  10295.                     n:           A system code page number.
  10296.  
  10297.         ## Usage:   Code page switching allows you to select different
  10298.                     character sets for language support.  To use code page
  10299.                     switching, you must have an EGA or VGA display and be
  10300.                     running under MS-DOS or PC-DOS 3.3 or above, or OS/2.
  10301.                     CHCP is not available in 4DOS/NT.
  10302.  
  10303.                     If you enter CHCP without a number, the current code
  10304.                     page is displayed.
  10305.  
  10306.                          c:\> chcp
  10307.                          Active code page: 437
  10308.  
  10309.                     If you enter CHCP plus a code page number, the system
  10310.                     code page is changed.  For example, to set the code
  10311.                     page to multilingual:
  10312.  
  10313.                          c:\> chcp 850
  10314.  
  10315.              4DOS   Before using CHCP under DOS, you must first load the
  10316.                     device drivers (in CONFIG.SYS), make sure the
  10317.                     information file (COUNTRY.SYS) is available, load
  10318.                     national language support (using the NLSFUNC command),
  10319.                     and prepare the specified code page for the devices
  10320.                     (using the MODE command with the CODEPAGE PREPARE
  10321.                     option).
  10322.  
  10323.                     CHCP accepts one of the prepared system code pages.
  10324.                     An error message is displayed if a code page is
  10325.                     selected that has not been prepared for the system.
  10326.  
  10327.                     See your DOS or OS/2 documentation for more
  10328.                     information on CHCP.
  10329.  
  10330.  
  10331.  
  10332.  
  10333.  
  10334.  
  10335.  
  10336.  
  10337.  
  10338.  
  10339.         -------------------------------------------------------------------
  10340.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 178
  10341.  
  10342.                                                                         CLS
  10343.         -------------------------------------------------------------------
  10344.  
  10345.         CLS                                                      (Enhanced)
  10346.  
  10347.         Purpose:    Clear the video display and move the cursor to the
  10348.                     upper left corner; optionally change the default
  10349.                     display and border colors.
  10350.  
  10351.         Format:     CLS [[BRIght] [BLInk] fg ON [BRIght] bg] [BORder bc]
  10352.  
  10353.                     fg:          The new foreground color
  10354.                     bg:          The new background color
  10355.                     bc:          The new border color
  10356.  
  10357.         Usage:      CLS can be used to clear the screen without changing
  10358.                     colors, or to clear the screen and change the screen
  10359.                     colors simultaneously.  These three examples show how
  10360.                     to clear the screen to the default colors, to bright
  10361.                     white letters on a blue background, and to bright
  10362.                     yellow letters on a magenta background with a blue
  10363.                     border:
  10364.  
  10365.                          c:\> cls
  10366.                          c:\> cls bright white on blue
  10367.                          c:\> cls bri yel on mag bor blu
  10368.  
  10369.                     CLS is often used in batch files to clear the screen
  10370.                     before displaying text.
  10371.  
  10372.                     See page 26 for details about colors and color names,
  10373.                     and notes on the use of bright background colors.
  10374.  
  10375.              4DOS## Under DOS, if ANSI.SYS or a compatible driver is not
  10376.                     loaded, the colors will not be "sticky" - you may lose
  10377.                     them after you run an application.  If 4DOS thinks you
  10378.                     have an ANSI driver loaded, it uses an ANSI clear
  10379.                     screen command.  Otherwise, 4DOS will call the BIOS to
  10380.                     clear the screen.  You can force 4DOS to recognize the
  10381.                     proper ANSI state with the SETDOS /A option (see page
  10382.                     309) or the ANSI directive in 4DOS.INI (see page 131).
  10383.  
  10384.              4DOS## If your display accommodates more than 25 rows by 80
  10385.                     columns and CLS doesn't clear the whole screen, your
  10386.                     ANSI driver probably does not support the large
  10387.                     display size properly.
  10388.  
  10389.  
  10390.  
  10391.  
  10392.  
  10393.  
  10394.  
  10395.         -------------------------------------------------------------------
  10396.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 179
  10397.  
  10398.                                                                       COLOR
  10399.         -------------------------------------------------------------------
  10400.  
  10401.         COLOR                                                         (New)
  10402.  
  10403.         Purpose:    Change the default display colors.
  10404.  
  10405.         Format:     COLOR [BRIght] [BLInk] fg ON [BRIght] bg [BORder bc]
  10406.  
  10407.                     fg:          The new foreground color
  10408.                     bg:          The new background color
  10409.                     bc:          The new border color
  10410.  
  10411.                     See also:  CLS, and page 26 for details about using
  10412.                     colors.
  10413.  
  10414.         Usage:      COLOR is normally used in batch files before
  10415.                     displaying text.  For example, to set screen colors to
  10416.                     bright white on blue, you can use this command:
  10417.  
  10418.                          c:\> color bright white on blue
  10419.  
  10420.              4DOS   If you have an ANSI driver (such as ANSI.SYS)
  10421.                     installed, COLOR will not change anything on the
  10422.                     screen.  It will only set the default colors for
  10423.                     subsequent screen displays.  If you are not using an
  10424.                     ANSI driver, COLOR will change the display colors of
  10425.                     every character on the screen.  However, the colors
  10426.                     will not be "sticky" - you may lose them after you run
  10427.                     an application.
  10428.  
  10429.              4DOS## If you see odd characters like "[44;37m" when you try
  10430.                     to set the screen colors, 4DOS probably thinks you
  10431.                     have an ANSI driver loaded when you don't.  Use SETDOS
  10432.                     /A2, or ANSI = No in 4DOS.INI, to tell 4DOS you have
  10433.                     no ANSI driver.
  10434.  
  10435.  
  10436.  
  10437.  
  10438.  
  10439.  
  10440.  
  10441.  
  10442.  
  10443.  
  10444.  
  10445.  
  10446.  
  10447.  
  10448.  
  10449.  
  10450.  
  10451.         -------------------------------------------------------------------
  10452.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 180
  10453.  
  10454.                                                                        COPY
  10455.         -------------------------------------------------------------------
  10456.  
  10457.         COPY                                                     (Enhanced)
  10458.  
  10459.         Purpose:    Copy data between disks, directories, files, or
  10460.                     physical hardware devices (such as your printer or
  10461.                     serial port).
  10462.  
  10463.         Format:     COPY [/C /H /M /N /P /Q /R /S /T /U /V] source[+] ...
  10464.                          [/A /B] destination [/A /B]
  10465.  
  10466.  
  10467.                     source:      A file or list of files or a device to
  10468.                                  copy from.
  10469.                     destination: A file, directory, or device to copy to.
  10470.  
  10471.                     /A(SCII)                 /Q(uiet)
  10472.                     /B(inary)                /R(eplace)
  10473.                     /C(hanged)               /S(ubdirectories)
  10474.                     /H(idden)                /T(otals)
  10475.                     /M(odified)              /U(pdate)
  10476.                     /N(othing)               /V(erify)
  10477.                     /P(rompt)
  10478.  
  10479.                     See also:  ATTRIB, MOVE, and REN.
  10480.  
  10481.         File Select:Supports extended wildcards, ranges, multiple file
  10482.                     names, and include lists (see pages 57 - 65).  Date,
  10483.                     time, or size ranges anywhere on the line apply to all
  10484.                     source files.
  10485.  
  10486.         Usage:      The COPY command accepts all traditional syntax and
  10487.                     options and adds several new features.
  10488.  
  10489.                     The simplest use of COPY is to make a copy of a file,
  10490.                     like this example which makes a copy of a file called
  10491.                     FILE1.ABC:
  10492.  
  10493.                          c:\> copy file1.abc file2.def
  10494.  
  10495.                     You can also copy a file to another drive and/or
  10496.                     directory.  The following command copies FILE1 to the
  10497.                     \MYDIR directory on drive E:
  10498.  
  10499.                          c:\> copy file1 e:\mydir
  10500.  
  10501.                     You can copy several files at once by using wildcards:
  10502.  
  10503.                          c:\> copy *.txt e:\mydir
  10504.  
  10505.  
  10506.  
  10507.         -------------------------------------------------------------------
  10508.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 181
  10509.  
  10510.                                                                        COPY
  10511.         -------------------------------------------------------------------
  10512.  
  10513.                     (See page 57 for an explanation of how 4DOS interprets
  10514.                     the wildcard characters [*] and [?].)
  10515.  
  10516.                     You can also list several source files in one command.
  10517.                     The following command copies 3 files from the current
  10518.                     directory to the \MYDIR directory on drive E:
  10519.  
  10520.                          c:\> copy file1 file2 file3 e:\mydir
  10521.  
  10522.                     The way COPY interprets your command line depends on
  10523.                     how many arguments (file, directory, or device names)
  10524.                     are on the line, and whether the arguments are
  10525.                     separated with [+] signs or spaces.
  10526.  
  10527.                     If there is only one argument on the line, COPY
  10528.                     assumes it is the source, and uses the current drive
  10529.                     and directory as the destination.  For example, the
  10530.                     following command copies all the .DAT files on drive A
  10531.                     to the current directory on drive C:
  10532.  
  10533.                          c:\> copy a:*.dat
  10534.  
  10535.                     If there are two or more arguments on the line and [+]
  10536.                     signs are not used, then COPY assumes that the last
  10537.                     argument is the destination and copies all source
  10538.                     files to this new location.  If the destination is a
  10539.                     drive, directory, or device name then the source files
  10540.                     are copied individually to the new location.  If the
  10541.                     destination is a file name, the first source file is
  10542.                     copied to the destination, and any additional source
  10543.                     files are then appended to the new destination file.
  10544.  
  10545.                     For example, the first of these commands copies the
  10546.                     .DAT files from the current directory on drive A
  10547.                     individually to C:\MYDIR (which must already exist as
  10548.                     a directory); the second appends all the .DAT files
  10549.                     together into one large file called C:\DATA (assuming
  10550.                     C:\DATA is not a directory):
  10551.  
  10552.                          c:>\ copy a:*.dat c:\mydir\
  10553.                          c:>\ copy a:*.dat c:\data
  10554.  
  10555.                     When you copy to a directory, if you add a backslash
  10556.                     [\] to the end of the name as shown in the first
  10557.                     example above, COPY will display an error message if
  10558.                     the name does not refer to an existing directory.  You
  10559.                     can use this feature to keep COPY from treating a
  10560.                     mistyped destination directory name as a file name and
  10561.                     attempting to append all your source files to a
  10562.  
  10563.         -------------------------------------------------------------------
  10564.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 182
  10565.  
  10566.                                                                        COPY
  10567.         -------------------------------------------------------------------
  10568.  
  10569.                     destination file, when you really meant to copy them
  10570.                     individually to a destination directory.
  10571.  
  10572.                  ## A plus [+] tells COPY to append two or more files to a
  10573.                     single destination file.  If you list several source
  10574.                     files separated with [+] and don't specify a
  10575.                     destination, COPY will use the name of the first
  10576.                     source file as the destination, and append each
  10577.                     subsequent file to the first file.  In this case the
  10578.                     destination file will always be created in the current
  10579.                     directory, even if the first source file is in another
  10580.                     directory or on another drive.
  10581.  
  10582.                     For example, the following command will append the
  10583.                     contents of C:\MEMO2 and C:\MEMO3 to C:\MEMO1 and
  10584.                     leave the combined contents in the file named
  10585.                     C:\MEMO1:
  10586.  
  10587.                          c:\> copy memo1+memo2+memo3
  10588.  
  10589.                     To append the same three files but store the result in
  10590.                     BIGMEMO:
  10591.  
  10592.                          c:\> copy memo1+memo2+memo3 bigmemo
  10593.  
  10594.                     To append C:\MEM\MEMO2 and C:\MEM\MEMO3 to
  10595.                     D:\DATA\MEMO1, and leave the result in C:\MEM\MEMO1:
  10596.  
  10597.                          c:\mem> copy d:\data\memo1+memo2+memo3
  10598.  
  10599.                  ## You cannot append files to a device (such as a
  10600.                     printer); if you try to do so, COPY will ignore the
  10601.                     [+] signs and copy the files individually.  If you
  10602.                     attempt to append several source files to a
  10603.                     destination directory or disk, COPY will append the
  10604.                     files and place the copy in the new location with the
  10605.                     same name as the first source file.
  10606.  
  10607.                  ## If your destination has wildcards in it, COPY will
  10608.                     attempt to match them with the source names.  For
  10609.                     example, this command copies the .DAT files from drive
  10610.                     A to C:\MYDIR and gives the new copies the extension
  10611.                     .DX:
  10612.  
  10613.                          c:\> copy a:*.dat c:\mydir\*.dx
  10614.  
  10615.                     This feature can give you unexpected results if you
  10616.                     use it with multiple source file names.  For example,
  10617.  
  10618.  
  10619.         -------------------------------------------------------------------
  10620.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 183
  10621.  
  10622.                                                                        COPY
  10623.         -------------------------------------------------------------------
  10624.  
  10625.                     suppose that drive A contains XYZ.DAT and XYZ.TXT.
  10626.                     The command
  10627.  
  10628.                          c:\> copy a:\*.dat a:\*.txt c:\mydir\*.dx
  10629.  
  10630.                     will copy A:XYZ.DAT to C:\MYDIR\XYZ.DX.  Then it will
  10631.                     copy A:XYZ.TXT to C:\MYDIR\XYZ.DX, overwriting the
  10632.                     first file it copied.
  10633.  
  10634.                  ## COPY also understands include lists (see page 65), so
  10635.                     you can specify several different kinds of files in
  10636.                     the same command.  This command copies the .TXT, .DOC,
  10637.                     and .BAT files from the E:\MYDIR directory to the root
  10638.                     directory of drive A:
  10639.  
  10640.                          c:\> copy e:\mydir\*.txt;*.doc;*.bat a:\
  10641.  
  10642.                  ## You can use date, time, and size ranges to further
  10643.                     define the files that you want to copy (see page 60
  10644.                     for information on ranges).  This example copies every
  10645.                     file in the E:\MYDIR directory, which was created or
  10646.                     modified yesterday, and which is also 10,000 bytes or
  10647.                     smaller in size, to the root directory of drive A:
  10648.  
  10649.                          c:\> copy /[d-1] /[s0,10000] e:\mydir\*.* a:\
  10650.  
  10651.                  ## COPY maintains the hidden and system attributes of
  10652.                     files, but not the read-only attribute.  The
  10653.                     destination file will always have the archive
  10654.                     attribute set.
  10655.  
  10656.              4DOS## If you are using 4DOS in an OS/2 DOS session, COPY
  10657.                     will copy OS/2 extended attributes from the source to
  10658.                     the destination, if the file system on the destination
  10659.                     drive supports them.
  10660.  
  10661.         Options:    The /A(SCII) and /B(inary) options apply to the
  10662.                     preceding filename and to all subsequent filenames on
  10663.                     the command line until the file name preceding the
  10664.                     next /A or /B, if any.  The other options (/C, /H, /M,
  10665.                     /N, /P, /Q, /R, /S, /T, /U, /V) apply to all filenames
  10666.                     on the command line, no matter where you put them.
  10667.                     For example, either of the following commands could be
  10668.                     used to copy a font file to the printer in binary
  10669.                     mode:
  10670.  
  10671.                          c:\> copy /b myfont.dat prn
  10672.                          c:\> copy myfont.dat /b prn
  10673.  
  10674.  
  10675.         -------------------------------------------------------------------
  10676.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 184
  10677.  
  10678.                                                                        COPY
  10679.         -------------------------------------------------------------------
  10680.  
  10681.                     Some options do not make sense in certain contexts, in
  10682.                     which case COPY will ignore them.  For example, you
  10683.                     cannot prompt before replacing an existing file when
  10684.                     the destination is a device such as the printer -
  10685.                     there's no such thing as an "existing file" on the
  10686.                     printer.  If you use conflicting output options, like
  10687.                     /Q and /P, COPY will take a "conservative" approach
  10688.                     and give priority to the option which generates more
  10689.                     prompts or more information.
  10690.  
  10691.                     Options used in less common situations have been
  10692.                     marked with ## below.  Remember that the options are
  10693.                     in alphabetical order, so more basic options are
  10694.                     interspersed with those marked with## .
  10695.  
  10696.                  ## /A(SCII):  If you use /A with a source filename, the
  10697.                     file will be copied up to, but not including, the
  10698.                     first Ctrl-Z (Control-Z or ASCII 26) character in the
  10699.                     file.  If you use /A with a destination filename, a
  10700.                     Ctrl-Z will be added to the end of the file (some
  10701.                     application programs use the Ctrl-Z to mark the end of
  10702.                     a file).  /A is the default when appending files, or
  10703.                     when the destination is a device like NUL or PRN,
  10704.                     rather than a disk file.
  10705.  
  10706.                  ## /B(inary):  If you use /B with a source filename, the
  10707.                     entire file is copied; Ctrl-Z characters in the file
  10708.                     do not affect the copy operation.  Using /B with a
  10709.                     destination filename prevents addition of a Ctrl-Z to
  10710.                     the end of the destination file.  /B is the default
  10711.                     for normal file copies.
  10712.  
  10713.                     /C(hanged files):  Copy files only if the destination
  10714.                     file exists and is older than the source (see also
  10715.                     /U).  This option is useful for updating the files in
  10716.                     one directory from those in another without copying
  10717.                     any newly created files.
  10718.  
  10719.                  ## /H(idden):  Copy all matching files including those
  10720.                     with the hidden and/or system attribute set (see page
  10721.                     18).
  10722.  
  10723.                     /M(odified):  Copy only those files with the archive
  10724.                     attribute set (see page 18), i.e., those which have
  10725.                     been modified since the last backup.  The archive
  10726.                     attribute will not be cleared after copying.
  10727.  
  10728.  
  10729.  
  10730.  
  10731.         -------------------------------------------------------------------
  10732.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 185
  10733.  
  10734.                                                                        COPY
  10735.         -------------------------------------------------------------------
  10736.  
  10737.                     /N(othing):  Do everything except actually perform the
  10738.                     copy.  This option is useful for testing what the
  10739.                     result of a complex COPY command will be.
  10740.  
  10741.                     /P(rompt):  Ask the user to confirm each source file.
  10742.                     Your options at the prompt are explained in detail on
  10743.                     page 48.
  10744.  
  10745.                     /Q(uiet):  Don't display filenames or the total number
  10746.                     of files copied.  This option is most often used in
  10747.                     batch files.  See also /T.
  10748.  
  10749.                     /R(eplace):  Prompt the user before overwriting an
  10750.                     existing file.   Your options at the prompt are
  10751.                     explained in detail on page 48.
  10752.  
  10753.                     /S(ubdirectories):  Copy the subdirectory tree
  10754.                     starting with the files in the source directory plus
  10755.                     each subdirectory below that.  The destination must be
  10756.                     a directory; if it doesn't exist, COPY will attempt to
  10757.                     create it.  COPY will also attempt to create needed
  10758.                     subdirectories on the tree below the destination,
  10759.                     including empty source directories.    If you attempt
  10760.                     to use COPY /S to copy a subdirectory tree into part
  10761.                     of itself, COPY will display an error message and
  10762.                     exit.
  10763.  
  10764.                     /T(otals):  Turns off  the display of filenames, like
  10765.                     /Q, but does display the total number of files copied.
  10766.  
  10767.                     /U(pdate):  Copy each source file only if it is newer
  10768.                     than a matching destination file or if a matching
  10769.                     destination file does not exist (see also /C).  This
  10770.                     option is useful for keeping one directory matched
  10771.                     with another with a minimum of copying.
  10772.  
  10773.                  ## /V(erify):  Verify each disk write.  This is the same
  10774.                     as executing the VERIFY ON command, but is only active
  10775.                     during the COPY.  /V does not read back the file and
  10776.                     compare its contents with what was written; it only
  10777.                     verifies that the data written to disk is physically
  10778.                     readable.
  10779.  
  10780.  
  10781.  
  10782.  
  10783.  
  10784.  
  10785.  
  10786.  
  10787.         -------------------------------------------------------------------
  10788.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 186
  10789.  
  10790.                                                             [4DOS]     CTTY
  10791.         -------------------------------------------------------------------
  10792.  
  10793.         CTTY         [4DOS]                                    (Compatible)
  10794.  
  10795.         Purpose:    Change the default console device.
  10796.  
  10797.         Format:     CTTY device
  10798.  
  10799.                     device:  The new console device.
  10800.  
  10801.         ##  Usage:  Normally, 4DOS uses the keyboard as the standard input
  10802.                     device and the display as the standard output device.
  10803.                     Together, the keyboard and display are known as the
  10804.                     console or CON.  The CTTY command allows you to
  10805.                     substitute another device that can perform standard
  10806.                     character I/O for the console.
  10807.  
  10808.                     For example to change the console to the first serial
  10809.                     port:
  10810.  
  10811.                          c:\> ctty com1
  10812.  
  10813.                     Change the console back to the standard keyboard and
  10814.                     display (this command must be entered from the current
  10815.                     console, e.g., a terminal attached to COM1, or from a
  10816.                     batch file):
  10817.  
  10818.                          c:\> ctty con
  10819.  
  10820.                     CTTY works only for programs and commands that use
  10821.                     standard DOS input and output functions.  This
  10822.                     includes all 4DOS internal commands except DRAWBOX,
  10823.                     DRAWHLINE, DRAWVLINE, LIST, SCREEN, SCRPUT, SELECT,
  10824.                     and VSCRPUT.  In addition, if you use color-coded
  10825.                     directories you should disable them with DIR /D when
  10826.                     using CTTY.  Otherwise directories will not be
  10827.                     displayed correctly.
  10828.  
  10829.  
  10830.  
  10831.  
  10832.  
  10833.  
  10834.  
  10835.  
  10836.  
  10837.  
  10838.  
  10839.  
  10840.  
  10841.  
  10842.  
  10843.         -------------------------------------------------------------------
  10844.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 187
  10845.  
  10846.                                                                        DATE
  10847.         -------------------------------------------------------------------
  10848.  
  10849.         DATE                                                   (Compatible)
  10850.  
  10851.         Purpose:    Display and optionally change the system date.
  10852.  
  10853.         Format:     DATE [mm-dd-yy]
  10854.  
  10855.                     mm:          The month (1 - 12).
  10856.                     dd:          The day (1 - 31).
  10857.                     yy:          The year (80 - 99 = 1980 - 1999, or a 4-
  10858.                                  digit year).
  10859.  
  10860.                     See also:  TIME.
  10861.  
  10862.         Usage:      If you simply type DATE without any parameters, you
  10863.                     will see the current system date and time, and be
  10864.                     prompted for a new date.  Press ENTER if you don't
  10865.                     wish to change the date.  If you type a new date, it
  10866.                     will become the current system date, which is included
  10867.                     in the directory entry for each file as it is created
  10868.                     or altered:
  10869.  
  10870.                          c:\> date
  10871.                          Wed  Dec 22, 1993  9:30:06
  10872.                          Enter new date (mm-dd-yy):
  10873.  
  10874.                     You can also enter a new system date by typing the
  10875.                     DATE command plus the new date on the command line:
  10876.  
  10877.                          c:\> date 3-16-94
  10878.  
  10879.                     You can use hyphens, slashes, or periods to separate
  10880.                     the month, day, and year entries.  A full 4-digit year
  10881.                     can be entered if you wish.
  10882.  
  10883.                     DATE adjusts the format it expects depending on your
  10884.                     country settings.  When entering the date, use the
  10885.                     correct format for the country setting currently in
  10886.                     effect on your system.
  10887.  
  10888.  
  10889.  
  10890.  
  10891.  
  10892.  
  10893.  
  10894.  
  10895.  
  10896.  
  10897.  
  10898.  
  10899.         -------------------------------------------------------------------
  10900.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 188
  10901.  
  10902.                                                                 DEL / ERASE
  10903.         -------------------------------------------------------------------
  10904.  
  10905.         DEL / ERASE                                              (Enhanced)
  10906.  
  10907.         Purpose:    Erase one file, a group of files, or entire
  10908.                     subdirectories.
  10909.  
  10910.         Format:     DEL [/F /N /P /Q /S /T /X /Y /Z] file...
  10911.                          or
  10912.                     ERASE [/F /N /P /Q /S /T /X /Y /Z] file...
  10913.  
  10914.                     file:        The file, subdirectory, or list of files
  10915.                                  or subdirectories to erase.
  10916.  
  10917.                     /F(orce delete)          /T(otal)
  10918.                     /N(othing)               /X (remove empty subdirs)
  10919.                     /P(rompt)                /Y(es to all prompts)
  10920.                     /Q(uiet)                 /Z(ap hidden / read-only)
  10921.                     /S(ubdirectories)
  10922.  
  10923.         File Select:Supports extended wildcards, ranges (see conditions
  10924.                     below), multiple file names, and include lists (see
  10925.                     pages 57 - 65).
  10926.  
  10927.         Usage:      DEL and ERASE are synonyms, you can use either one.
  10928.  
  10929.                     Use the DEL and ERASE commands with caution; the files
  10930.                     and subdirectories that you erase may be impossible to
  10931.                     recover without specialized utilities and a lot of
  10932.                     work.
  10933.  
  10934.                     To erase a single file, simply enter the file name:
  10935.  
  10936.                          c:\> del letters.txt
  10937.  
  10938.                     You can also erase multiple files in a single command.
  10939.                     For example, to erase all the files in the current
  10940.                     directory with a .BAK or .PRN extension:
  10941.  
  10942.                          c:\> del *.bak *.prn
  10943.  
  10944.                     If you enter a subdirectory name, or a filename
  10945.                     composed only of wildcards (* and/or ?), DEL asks for
  10946.                     confirmation (Y or N) unless you specified the /Y
  10947.                     option.  If you respond with a Y, DEL will delete all
  10948.                     the files in that subdirectory (hidden, system, and
  10949.                     read-only files are only deleted if you use the /Z
  10950.                     option).
  10951.  
  10952.              4DOS ! Under DOS, the DEL /Q option uses a high-speed
  10953.                     deletion method which cannot take date, time, and size
  10954.  
  10955.         -------------------------------------------------------------------
  10956.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 189
  10957.  
  10958.                                                                 DEL / ERASE
  10959.         -------------------------------------------------------------------
  10960.  
  10961.                     ranges into account.  Therefore you should NOT use DEL
  10962.                     /Q with date, time, or size ranges.  If you do, the
  10963.                     range will be ignored, and all the files you specified
  10964.                     will be deleted regardless of their date, time, or
  10965.                     size.  This restriction does not apply in OS/2 DOS
  10966.                     sessions, because the high speed deletion method is
  10967.                     not available in OS/2 DOS.
  10968.  
  10969.                     DEL displays the amount of disk space recovered,
  10970.                     unless the /Q option is used (see below).  It does so
  10971.                     by comparing the amount of free disk space before and
  10972.                     after the DEL command is executed.  This amount may be
  10973.                     incorrect if you are using a deletion tracking system
  10974.                     which stores deleted files in a hidden directory, or
  10975.                     if, under a multitasking system, another program
  10976.                     performs a file operation while the DEL command is
  10977.                     executing.
  10978.  
  10979.                     Remember that DEL removes file descriptions along with
  10980.                     files.  Most deletion tracking systems will not be
  10981.                     able to save or recover a file's description, even if
  10982.                     they can save or recover the data in a file.
  10983.  
  10984.                  ## DEL returns a non-zero exit code if no files are
  10985.                     deleted, or if another error occurs.  You can test
  10986.                     this exit code with the %_? environment variable (see
  10987.                     page 99), and use it with conditional commands (&& and
  10988.                     ||; see page 68).
  10989.  
  10990.         Options: ## /F(orce delete):  This option is only for use in the
  10991.                     32-bit version of 4OS2, and in 4DOS when running in an
  10992.                     OS/2 2.1 or later DOS session.  It forces deletion of
  10993.                     the file without saving it to the DELDIR directory (if
  10994.                     DELDIR is not in use, /F has no effect).
  10995.  
  10996.                     /N(othing):  Do everything except actually delete the
  10997.                     file(s).  This is useful for testing what the result
  10998.                     of a DEL would be.
  10999.  
  11000.                     /P(rompt):  Prompt the user to confirm each erasure.
  11001.                     Your options at the prompt are explained in detail on
  11002.                     page 48.
  11003.  
  11004.                     /Q(uiet):  Don't display filenames as they are
  11005.                     deleted, or the number of files deleted or bytes
  11006.                     freed.  When running 4DOS under DOS, DEL will run
  11007.                     fastest if you specify the /Q option and the filename
  11008.                     doesn't use the extended 4DOS wildcards.  When running
  11009.                     4OS2, 4DOS/NT, or 4DOS under OS/2, /Q will have little
  11010.  
  11011.         -------------------------------------------------------------------
  11012.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 190
  11013.  
  11014.                                                                 DEL / ERASE
  11015.         -------------------------------------------------------------------
  11016.  
  11017.                     or no effect on DEL's speed.  Do not use /Q with date,
  11018.                     time, or size ranges (see note above).  See also /T.
  11019.  
  11020.                  !  /S(ubdirectories):  Delete the specified files in this
  11021.                     directory and all of its subdirectories.  This is like
  11022.                     a GLOBAL DEL, and can be used to delete all the files
  11023.                     in a subdirectory tree or even a whole disk.  It
  11024.                     should be used with caution!
  11025.  
  11026.                     /T(otal):  Don't display filenames as they are
  11027.                     deleted, but display the total number of files deleted
  11028.                     plus the amount of free disk space recovered.  Unlike
  11029.                     /Q, the /T option will not speed up deletions under
  11030.                     DOS.
  11031.  
  11032.                  ## /X (remove empty subdirectories):  Remove empty
  11033.                     subdirectories after deleting (only useful when used
  11034.                     with /S).
  11035.  
  11036.                ! ## /Y(es):  The reverse of /P - it assumes a Y response
  11037.                     to everything, including deleting an entire
  11038.                     subdirectory tree.  4DOS, 4OS2, and 4DOS/NT normally
  11039.                     prompt before deleting files when the name consists
  11040.                     only of wildcards or a subdirectory name (see above);
  11041.                     /Y overrides this protection, and should be used with
  11042.                     extreme caution!
  11043.  
  11044.                ! ## /Z(ap):  Delete read-only, hidden, and system files as
  11045.                     well as normal files.  Files with the read-only,
  11046.                     hidden, or system attribute set are normally protected
  11047.                     from deletion; /Z overrides this protection, and
  11048.                     should be used with caution.  Because EXCEPT works by
  11049.                     hiding files, /Z will override an EXCEPT command.
  11050.  
  11051.                     For example, to delete the entire subdirectory tree
  11052.                     starting with C:\UTIL, including hidden and read-only
  11053.                     files, without prompting (use this command with
  11054.                     CAUTION!):
  11055.  
  11056.                          c:\> del /sxyz c:\util\
  11057.  
  11058.  
  11059.  
  11060.  
  11061.  
  11062.  
  11063.  
  11064.  
  11065.  
  11066.  
  11067.         -------------------------------------------------------------------
  11068.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 191
  11069.  
  11070.                                                                       DELAY
  11071.         -------------------------------------------------------------------
  11072.  
  11073.         DELAY                                                         (New)
  11074.  
  11075.         Purpose:    Pause for a specified length of time.
  11076.  
  11077.         Format:     DELAY [seconds]
  11078.  
  11079.                     seconds:     The number of seconds to delay.
  11080.  
  11081.         Usage:      DELAY is useful in batch file loops while waiting for
  11082.                     something to occur.  To wait for 10 seconds:
  11083.  
  11084.                          delay 10
  11085.  
  11086.                     A simple loop could make a tone with the BEEP command
  11087.                     to get the operator's attention and then DELAY for a
  11088.                     few seconds while waiting for the user to respond.
  11089.  
  11090.                  ## For delays shorter than one second, use the BEEP
  11091.                     command with an inaudible frequency (below 20 Hz).
  11092.  
  11093.                     You can cancel a delay by pressing Ctrl-C or Ctrl-
  11094.                     Break.
  11095.  
  11096.  
  11097.  
  11098.  
  11099.  
  11100.  
  11101.  
  11102.  
  11103.  
  11104.  
  11105.  
  11106.  
  11107.  
  11108.  
  11109.  
  11110.  
  11111.  
  11112.  
  11113.  
  11114.  
  11115.  
  11116.  
  11117.  
  11118.  
  11119.  
  11120.  
  11121.  
  11122.  
  11123.         -------------------------------------------------------------------
  11124.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 192
  11125.  
  11126.                                                                    DESCRIBE
  11127.         -------------------------------------------------------------------
  11128.  
  11129.         DESCRIBE                                                      (New)
  11130.  
  11131.         Purpose:    Create, modify, or delete file and subdirectory
  11132.                     descriptions.
  11133.  
  11134.         Format:     DESCRIBE file ["description"] ...
  11135.  
  11136.                     file:        The file or files to operate on.
  11137.                     "description": The description to attach to the file.
  11138.  
  11139.         File Select:Supports extended wildcards, ranges, multiple file
  11140.                     names, and include lists (see pages 57 - 65).
  11141.  
  11142.         Usage:      DESCRIBE adds descriptions to files and
  11143.                     subdirectories.  The descriptions are displayed by DIR
  11144.                     in single-column mode and by SELECT.  Descriptions let
  11145.                     you identify your files in much more meaningful ways
  11146.                     than you can in an eight-character filename.
  11147.  
  11148.                     You enter a description on the command line by typing
  11149.                     the DESCRIBE command, the filename, and the
  11150.                     description in quotation marks, like this:
  11151.  
  11152.                          c:\> describe memo.txt "Memo to Bob about party"
  11153.  
  11154.                     If you don't put a description on the command line,
  11155.                     DESCRIBE will prompt you for it:
  11156.  
  11157.                          c:\> describe memo.txt
  11158.                          Describe "memo.txt" : Memo to Bob about party
  11159.  
  11160.                     If you use wildcards or multiple filenames with the
  11161.                     DESCRIBE command and don't include the description
  11162.                     text, you will be prompted to enter a description for
  11163.                     each file.  If you do include the description on the
  11164.                     command line, all matching files will be given the
  11165.                     same description.
  11166.  
  11167.                     Each description can be up to 40 characters long.  You
  11168.                     can change this limit with the DescriptionMax
  11169.                     directive in 4DOS.INI (see page 132).  DESCRIBE can
  11170.                     edit descriptions longer than DescriptionMax (up to a
  11171.                     limit of 200 characters), but will not allow you to
  11172.                     lengthen the existing text.
  11173.  
  11174.                     The descriptions are stored in each directory in a
  11175.                     hidden file called DESCRIPT.ION.  Use the ATTRIB
  11176.                     command to remove the hidden attribute from this file
  11177.                     if you need to copy or delete it.  (DESCRIPT.ION is
  11178.  
  11179.         -------------------------------------------------------------------
  11180.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 193
  11181.  
  11182.                                                                    DESCRIBE
  11183.         -------------------------------------------------------------------
  11184.  
  11185.                     always created as a hidden file, but will not be re-
  11186.                     hidden by 4DOS, 4OS2, or 4DOS/NT if you remove the
  11187.                     hidden attribute.)
  11188.  
  11189.                     The description file is modified appropriately
  11190.                     whenever you perform an internal command which affects
  11191.                     it (such as COPY, MOVE, DEL, or RENAME), but not if
  11192.                     you use an external program (such as XCOPY or a visual
  11193.                     shell).
  11194.  
  11195.              4OS2,! On HPFS and NTFS drives, you will not see file
  11196.              4NT    descriptions in a normal DIR display, because DIR must
  11197.                     leave space for the long filenames used on these
  11198.                     drives.  To view the descriptions, use DIR /Z to
  11199.                     display the directory in FAT format.  See the DIR
  11200.                     command for more details.
  11201.  
  11202.  
  11203.  
  11204.  
  11205.  
  11206.  
  11207.  
  11208.  
  11209.  
  11210.  
  11211.  
  11212.  
  11213.  
  11214.  
  11215.  
  11216.  
  11217.  
  11218.  
  11219.  
  11220.  
  11221.  
  11222.  
  11223.  
  11224.  
  11225.  
  11226.  
  11227.  
  11228.  
  11229.  
  11230.  
  11231.  
  11232.  
  11233.  
  11234.  
  11235.         -------------------------------------------------------------------
  11236.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 194
  11237.  
  11238.                                                  [4OS2, 4DOS/NT]     DETACH
  11239.         -------------------------------------------------------------------
  11240.  
  11241.         DETACH       [4OS2, 4DOS/NT]                           (Compatible)
  11242.  
  11243.         Purpose:    Start an OS/2 or Windows NT program in detached mode.
  11244.  
  11245.         Format:     DETACH command
  11246.  
  11247.                     command:  The name of a command to execute, including
  11248.                     an optional drive and path specification.  The name
  11249.                     must be enclosed in quotation marks if it contains any
  11250.                     spaces.
  11251.  
  11252.                     See also:  START.
  11253.  
  11254.         Usage:      When you start a program with DETACH, that program
  11255.                     cannot use the keyboard, mouse, or video display.  It
  11256.                     is "detached" from the normal means of user input and
  11257.                     output.  However, you can redirect the program's
  11258.                     standard I/O to other devices if necessary, using
  11259.                     redirection symbols (see page 50).
  11260.  
  11261.                     The command can be an internal command, external
  11262.                     command, alias, or batch file.  4OS2 or 4DOS/NT will
  11263.                     detach a copy of itself to execute the command.
  11264.  
  11265.                     For example, the following command will detach a copy
  11266.                     of the command processor to run the batch file
  11267.                     XYZ.BTM:
  11268.  
  11269.                          [c:\] detach xyz.btm
  11270.  
  11271.                     Once the program has started, 4OS2 or 4DOS/NT returns
  11272.                     to the prompt immediately.  It does not wait for a
  11273.                     detached program to finish.
  11274.  
  11275.  
  11276.  
  11277.  
  11278.  
  11279.  
  11280.  
  11281.  
  11282.  
  11283.  
  11284.  
  11285.  
  11286.  
  11287.  
  11288.  
  11289.  
  11290.  
  11291.         -------------------------------------------------------------------
  11292.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 195
  11293.  
  11294.                                                                         DIR
  11295.         -------------------------------------------------------------------
  11296.  
  11297.         DIR                                                      (Enhanced)
  11298.  
  11299.         Purpose:    Display information about files and subdirectories.
  11300.  
  11301.         Format:     DIR [/1 /2 /4 /A[[:][-]rhsda] /B /C[HP] /D /E /F /H
  11302.                          /I"text" /J /K /L /M /N /O[[:][-]acdeginrsu] /P
  11303.                          /R /S /T[:acw] /U /V /W /X /Z] [file...]
  11304.  
  11305.                     file:        The file, directory, or list of files or
  11306.                                  directories to display.
  11307.  
  11308.                     /1 (one column)          /L(ower case)
  11309.                     /2 (two columns)         /M (suppress footer)
  11310.                     /4 (four columns)        /N(ormal) or (New format)
  11311.                     /A(ttribute select)      /O(rder)
  11312.                     /B(are)                  /P(ause)
  11313.                     /C[HP] (Compression)     /R (disable wRap)
  11314.                     /D(isable color coding)  /S(ubdirectories)
  11315.                     /E (use upper case)      /T (aTtribute) or (Time)
  11316.                     /F(ull path)             /U (sUmmary information)
  11317.                     /H(ide dots)             /V(ertical sort)
  11318.                     /I (match descriptions)  /W(ide)
  11319.                     /J(ustify names)         /X (display short names)
  11320.                     /K (suppress header)     /Z (use FAT format)
  11321.  
  11322.  
  11323.                     See also:  ATTRIB, DESCRIBE, SELECT, and SETDOS.
  11324.  
  11325.         File Select:Supports extended wildcards, ranges, multiple file
  11326.                     names, and include lists (see pages 57 - 65).
  11327.  
  11328.         Usage:      DIR can be used to display information about files
  11329.                     from one or more of your disk directories, in a wide
  11330.                     range of formats.  Depending on the options chosen,
  11331.                     you can display the file name, attributes, and size;
  11332.                     the time and date of the last change to the file; the
  11333.                     file description; and the file's compression ratio.
  11334.                     You can also display information in 1, 2, 4, or 5
  11335.                     columns, sort the files several different ways, use
  11336.                     color to distinguish file types, and pause after each
  11337.                     full screen.
  11338.  
  11339.                     The various DIR displays are controlled through
  11340.                     options or switches.  The best way to learn how to use
  11341.                     the many options available with the DIR command is to
  11342.                     experiment.  You will soon know which options you want
  11343.                     to use regularly.  You can select those options
  11344.                     permanently by using the ALIAS command.
  11345.  
  11346.  
  11347.         -------------------------------------------------------------------
  11348.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 196
  11349.  
  11350.                                                                         DIR
  11351.         -------------------------------------------------------------------
  11352.  
  11353.                     You may want to mix several options.  For example, to
  11354.                     display all the files in the current directory, in 2
  11355.                     columns, sorted vertically (down one column then down
  11356.                     the next), and with a pause at the end of each page:
  11357.  
  11358.                          c:\> dir /2/p/v
  11359.  
  11360.                     To set up this format as the default, using an alias:
  11361.  
  11362.                          c:\> alias dir=*dir /2/p/v
  11363.  
  11364.                     This example displays all the files on all directories
  11365.                     of drive C, including hidden and system files, pausing
  11366.                     after each page:
  11367.  
  11368.                          c:\> dir /s/a/p c:\
  11369.  
  11370.                     DIR allows wildcard characters (* and ?) in the
  11371.                     filename.  If you don't specify a filename, DIR
  11372.                     defaults to *.* (display all non-hidden files and
  11373.                     subdirectories in the current directory).  To display
  11374.                     all of the .WKS files in the current directory:
  11375.  
  11376.                          c:\> dir *.wks
  11377.  
  11378.                     With the /I option, DIR can select files to display
  11379.                     based on their descriptions.  DIR will display a file
  11380.                     if its description matches the text after the /I
  11381.                     switch.  The search is not case sensitive.  You can
  11382.                     use wildcards and extended wildcards as part of the
  11383.                     text.  For example, to display any file described as a
  11384.                     "Test File" you can use this command:
  11385.  
  11386.                          c:\> dir /i"test file"
  11387.  
  11388.                     If you want to display files that include the words
  11389.                     "test file" anywhere in their descriptions, use
  11390.                     extended wild cards like this:
  11391.  
  11392.                          c:\> dir /i"*test file*"
  11393.  
  11394.                     If you link two or more filenames together with
  11395.                     spaces, DIR will display all of the files that match
  11396.                     the first name and then all of the files that match
  11397.                     the second name.  You may use a different drive and
  11398.                     path for each filename.  This example lists all of the
  11399.                     .WKS and then all of the .WK1 files in the current
  11400.                     directory:
  11401.  
  11402.  
  11403.         -------------------------------------------------------------------
  11404.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 197
  11405.  
  11406.                                                                         DIR
  11407.         -------------------------------------------------------------------
  11408.  
  11409.                          c:\> dir *.wks *.wk1
  11410.  
  11411.                     If you use an include list (see page 65) to link
  11412.                     multiple filenames, DIR will display the matching
  11413.                     filenames in a single listing.  Only the first
  11414.                     filename in an include list can have a path; the other
  11415.                     files must be in the same path.  This example displays
  11416.                     the same files as the previous example, but the .WKS
  11417.                     and .WK1 files are intermixed:
  11418.  
  11419.                          c:\> dir *.wks;*.wk1
  11420.  
  11421.                     You can display the file and subdirectory names in
  11422.                     color by setting the COLORDIR environment variable or
  11423.                     using the ColorDir directive in your .INI file.  See
  11424.                     page 30 for details.
  11425.  
  11426.                  ## If you are using color-coded directories and attempt
  11427.                     to redirect the output of DIR to a character device,
  11428.                     such as a serial port or the printer, non-color-coded
  11429.                     file names will be displayed on the device but color-
  11430.                     coded names may still be displayed on the screen.
  11431.                     This will not occur if the output of DIR is redirected
  11432.                     to a disk file.  To prevent this problem, use the /D
  11433.                     switch to disable color coding when redirecting the
  11434.                     output of DIR to a character device.
  11435.  
  11436.                     When displaying file descriptions, DIR will wrap long
  11437.                     lines to fit on the screen.  DIR displays a maximum of
  11438.                     40 characters of text in each line of a description,
  11439.                     unless your screen width allows a wider display.  If
  11440.                     you disable description wrapping with the /R switch,
  11441.                     the description is truncated at the right edge of the
  11442.                     screen, and a right arrow [a] is added at the end of
  11443.                     the line to alert you to the existence of additional
  11444.                     description text.
  11445.  
  11446.                     If you attempt to redirect the output of DIR to a
  11447.                     character device, such as a serial port or the
  11448.                     printer, long descriptions will be wrapped at the
  11449.                     screen width in the redirected output.  If this is not
  11450.                     what you want, use /R to disable wrapping.
  11451.  
  11452.              4DOS## If you are using a disk compression program, you can
  11453.                     use the /C switch to view the amount of compression
  11454.                     achieved for each file.  When you do, the compression
  11455.                     ratio is displayed instead of the file's description.
  11456.                     You can also sort the display by compression ratios
  11457.                     with the /O:c switch.  Details for both switches are
  11458.  
  11459.         -------------------------------------------------------------------
  11460.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 198
  11461.  
  11462.                                                                         DIR
  11463.         -------------------------------------------------------------------
  11464.  
  11465.                     in the Options section, below.  See APPNOTES.DOC for a
  11466.                     list of compression systems supported by the 4DOS DIR
  11467.                     command.
  11468.  
  11469.                  ## When sorting file names and extensions, 4DOS, 4OS2,
  11470.                     and 4DOS/NT normally assume that sequences of digits
  11471.                     should be sorted numerically (for example, the file
  11472.                     DRAW2 would come before DRAW03 because 2 is
  11473.                     numerically smaller than 03), rather than strictly
  11474.                     alphabetically (where DRAW2 would come second because
  11475.                     "2" is after "0" in alphanumeric order).  You can
  11476.                     defeat this behavior and force a strict alphabetic
  11477.                     sort with the /O:a option.
  11478.  
  11479.                  ## If you have selected a specific country code for your
  11480.                     system, DIR will display the date in the format for
  11481.                     that country.  The default date format is U.S. (mm-dd-
  11482.                     yy).  The separator character in the file time will
  11483.                     also be affected by the country code.
  11484.  
  11485.              4DOS## DIR can handle directories of any size, limited only
  11486.                     by available memory.  Under 4DOS, each filename
  11487.                     requires 32 bytes of free base memory plus the size of
  11488.                     the description (if any).  For example, a system with
  11489.                     just 128K of free memory can display up to 4,000 files
  11490.                     per directory.  Memory requirements for DIR are
  11491.                     generally not a concern under 4OS2 and 4DOS/NT,
  11492.                     because of the virtual memory available under these
  11493.                     operating systems.
  11494.  
  11495.                  ## Options on the command line apply only to the
  11496.                     filenames which follow the option, and options at the
  11497.                     end of the line apply to the preceding filename only.
  11498.                     This allows you to specify different options for
  11499.                     different groups of files, yet retains compatibility
  11500.                     with the traditional DIR command when a single
  11501.                     filename is specified.
  11502.  
  11503.         Options:    /1:  Single column display - display the filename,
  11504.                     size, date, time, and description.  This is the
  11505.                     default.  If /T is used the attributes are displayed
  11506.                     instead of the description; if /C or /O:c is used the
  11507.                     compression ratio is displayed instead of the
  11508.                     description.
  11509.  
  11510.                     /2:  Two column display - display the filename, size,
  11511.                     date, and time.  If you use /2 (or /4) on an HPFS or
  11512.                     NTFS drive under 4OS2 or 4DOS/NT, DIR will only
  11513.                     display the file names.  Also, the number of columns
  11514.  
  11515.         -------------------------------------------------------------------
  11516.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 199
  11517.  
  11518.                                                                         DIR
  11519.         -------------------------------------------------------------------
  11520.  
  11521.                     may be reduced to one for names too long to fit on
  11522.                     half the screen.  Due to these restrictions, /2 is
  11523.                     normally most useful on HPFS and NTFS drives when used
  11524.                     with /Z to force the display to FAT format.
  11525.  
  11526.                     /4:  Four column display - display the filename and
  11527.                     size, in K (kilobytes) or M (megabytes).  The note
  11528.                     under /2 above regarding HPFS and NTFS drives applies
  11529.                     to /4 as well.
  11530.  
  11531.                  ## /A(ttribute select): Display only those files that
  11532.                     have the specified attribute(s) set.  Preceding the
  11533.                     attribute character with a hyphen [-] will display
  11534.                     files that do not have that attribute set.  The
  11535.                     attributes are:
  11536.  
  11537.                             R      Read-only         D    Subdirectory
  11538.                             H      Hidden            A    Archive
  11539.                             S      System
  11540.  
  11541.                     If no attributes are listed at all (e.g., DIR /A), DIR
  11542.                     will display all files and subdirectories including
  11543.                     hidden and system files.  If attributes are combined,
  11544.                     all the specified attributes must match for a file to
  11545.                     be included in the listing.  For example, /A:RHS will
  11546.                     display only those files with all three attributes
  11547.                     set.  See page 18 for more information on file
  11548.                     attributes.
  11549.  
  11550.                  ## /B(are):  Suppress the header and summary lines, and
  11551.                     display file or subdirectory names only, in a single
  11552.                     column.  This option is most useful when you want to
  11553.                     redirect a list of names to a file or another program.
  11554.                     If you use /B with /S, DIR will show the full path of
  11555.                     each file instead of simply its name and extension.
  11556.  
  11557.              4DOS   /C(ompression):  Display per-file and total
  11558.                     compression ratio on compressed drives.  The
  11559.                     compression ratio is displayed instead of the file
  11560.                     description or attributes.  The ratio is left blank
  11561.                     for directories and files with a length of 0 bytes,
  11562.                     and for files on non-compressed drives.  /C only works
  11563.                     in single-column mode; it is ignored if /2, /4, or /W
  11564.                     is used.  See APPNOTES.DOC for a list of supported
  11565.                     compression systems.
  11566.  
  11567.                     The numerator of the displayed compression ratio is
  11568.                     the amount of space which would be allocated to the
  11569.                     file if the compression utility were not in use, based
  11570.  
  11571.         -------------------------------------------------------------------
  11572.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 200
  11573.  
  11574.                                                                         DIR
  11575.         -------------------------------------------------------------------
  11576.  
  11577.                     on the compressed drive's cluster size (usually 8K
  11578.                     bytes).  The denominator is the space actually
  11579.                     allocated for the compressed file.  For example, if a
  11580.                     file is allocated 6,144 bytes when compressed, and
  11581.                     would require 8,192 bytes if uncompressed, the
  11582.                     displayed compression ratio would be 8,192 / 6,144, or
  11583.                     1.3 to 1.
  11584.  
  11585.                     Using /CH displays compression ratios like /C, but
  11586.                     bases the calculation on the host drive's cluster
  11587.                     size.  This gives a more accurate picture of the space
  11588.                     saved through compression than is given by /C.  This
  11589.                     option will occasionally display compression ratios
  11590.                     slightly less than 1.0 to 1.0 for files which have
  11591.                     actually expanded when stored on the compressed drive.
  11592.  
  11593.                     If /CP is used instead of /C, the compression is
  11594.                     displayed as a percentage (e.g., 33%) instead of a
  11595.                     ratio (e.g., 3 to 1).  If /CHP is used instead of /CH,
  11596.                     the host compression is displayed as a percentage.
  11597.                     The /CHP option must be entered as shown; you can not
  11598.                     use /CPH.
  11599.  
  11600.                  ## /D(isable color coding):  Temporarily disable
  11601.                     directory color coding.  May be required when color-
  11602.                     coded directories are used and DIR output is
  11603.                     redirected to a character device like the printer
  11604.                     (e.g., PRN or LPT1) or serial port (e.g., COM1 or
  11605.                     COM2).  /D is not required when DIR output is
  11606.                     redirected to a file.
  11607.  
  11608.                     /E:  Display filenames in the traditional upper case;
  11609.                     also see SETDOS /U (page 312) and the UpperCase
  11610.                     directive in 4DOS.INI (page 135).  /E is ignored under
  11611.                     4OS2 and 4DOS/NT if the display is in HPFS or NTFS
  11612.                     format.  HPFS and NTFS file names are always displayed
  11613.                     in the case in which they are stored.
  11614.  
  11615.                  ## /F(ull path):  Display each filename with its drive
  11616.                     letter and path in a single column, without other
  11617.                     information.
  11618.  
  11619.                     /H(ide dots):  Suppress the display of the "." and
  11620.                     ".." directories.
  11621.  
  11622.                     /I:  Display filenames by matching text in their
  11623.                     descriptions.  The text can include wild cards and
  11624.                     extended wildcards.  The search text must be enclosed
  11625.                     in quotation marks.  /I may be used to select files
  11626.  
  11627.         -------------------------------------------------------------------
  11628.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 201
  11629.  
  11630.                                                                         DIR
  11631.         -------------------------------------------------------------------
  11632.  
  11633.                     even if descriptions are not displayed (for example,
  11634.                     if /2 is used).  However, /I will be ignored if /C or
  11635.                     /O:c is used.
  11636.  
  11637.                     /J(ustify names):  Justify (align) filename extensions
  11638.                     and display them in the traditional format.
  11639.  
  11640.                  ## /K:  Suppress the header (disk and directory name)
  11641.                     display.
  11642.  
  11643.                     /L(ower case):  Display file and directory names in
  11644.                     lower case; also see SETDOS /U (page 312) and the
  11645.                     UpperCase directive in 4DOS.INI (page 135).  /L is
  11646.                     ignored under 4OS2 and 4DOS/NT if the display is in
  11647.                     HPFS or NTFS format.  HPFS and NTFS file names are
  11648.                     always displayed in the case in which they are stored.
  11649.  
  11650.                  ## /M:  Suppress the footer (file and byte count totals)
  11651.                     display.
  11652.  
  11653.              4DOS   /N:  Reset the DIR options to the default values.
  11654.                     This is useful when you want to display some files in
  11655.                     one format, and then change back to the defaults for
  11656.                     another set of files.
  11657.  
  11658.              4OS2,  /N:  Use the HPFS or NTFS display format, even if the
  11659.              4NT    files are stored on a FAT file system volume.
  11660.  
  11661.                     /O(rder):  Set the sorting order.  You may use any
  11662.                     combination of the following sorting options; if
  11663.                     multiple options are used, the listing will be sorted
  11664.                     with the first sort option as the primary key, the
  11665.                     next as the secondary key, and so on:
  11666.  
  11667.                          -    Reverse the sort order for the next option
  11668.                          a    Sort names and extensions in standard ASCII
  11669.                               order, rather than sorting numerically when
  11670.                               digits are included in the name or
  11671.                               extension.
  11672.                          c    Sort by compression ratio (the least
  11673.                               compressed file in the list will be
  11674.                               displayed first).  For single-column
  11675.                               directory displays, the compression ratios
  11676.                               will be used as the basis of the sort and
  11677.                               will also be displayed.  For wider displays
  11678.                               (/2, /4, and /W), the compression ratios
  11679.                               will be used to determine the order but will
  11680.                               not be displayed.  If /O:c is used with /CH
  11681.  
  11682.  
  11683.         -------------------------------------------------------------------
  11684.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 202
  11685.  
  11686.                                                                         DIR
  11687.         -------------------------------------------------------------------
  11688.  
  11689.                               or /CHP, the sort will be based on the host-
  11690.                               drive compression ratios.
  11691.                          d    Sort by date and time (oldest first); for
  11692.                               HPFS and NTFS drives also see /T.
  11693.                          e    Sort by extension.
  11694.                          g    Group subdirectories first, then files.
  11695.                          i    Sort by the file description (ignored if /C
  11696.                               or /O:c is also used).
  11697.                          n    Sort by filename (this is the default).
  11698.                          r    Reverse the sort order for all options.
  11699.                          s    Sort by size.
  11700.                          u    Unsorted.
  11701.  
  11702.                     /P(ause):  Wait for a key to be pressed after each
  11703.                     screen page before continuing the display.  Your
  11704.                     options at the prompt are explained in detail on page
  11705.                     48.
  11706.  
  11707.                     /R  (disable wRap):  Forces long descriptions to be
  11708.                     displayed on a single line, rather than wrapped onto
  11709.                     two or more lines.  Use /R when output is redirected
  11710.                     to a character device, such as a serial port or the
  11711.                     printer; or when you want descriptions truncated,
  11712.                     rather than wrapped, in the on-screen display.
  11713.  
  11714.                     /S(ubdirectories):  Display file information from the
  11715.                     current directory and all of its subdirectories.  DIR
  11716.                     will only display headers and summaries for those
  11717.                     directories which contain files that match the
  11718.                     filename(s) and attributes (if /A is used) that you
  11719.                     specify on the command line.
  11720.  
  11721.              4DOS## /T (aTtribute display):  Display the filenames and
  11722.                     attributes only.  File descriptions are not displayed
  11723.                     if /T is used (the attributes are displayed in place
  11724.                     of the descriptions).  /T is ignored if /C or /O:c is
  11725.                     also used.  The attributes are displayed in the format
  11726.                     RHSA, where:
  11727.  
  11728.                             R      Read-only         S    System
  11729.                             H      Hidden            A    Archive
  11730.  
  11731.              4OS2,  /T:acw (Time display):  Specify which of the date and
  11732.              4NT    time fields on an NTFS or HPFS drive should be
  11733.                     displayed and used for sorting:
  11734.  
  11735.                                  a last access time
  11736.                                  c creation time
  11737.                                  w last write time (default)
  11738.  
  11739.         -------------------------------------------------------------------
  11740.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 203
  11741.  
  11742.                                                                         DIR
  11743.         -------------------------------------------------------------------
  11744.  
  11745.                     /U (sUmmary information):  Only display the number of
  11746.                     files, the total file size, and the total amount of
  11747.                     disk space used.
  11748.  
  11749.                     /V(ertical sort):  Display the filenames sorted
  11750.                     vertically rather than horizontally (use with the /2,
  11751.                     /4 or /W options).
  11752.  
  11753.                     /W(ide):  Display filenames only, horizontally across
  11754.                     the screen (5 columns on an 80-character wide
  11755.                     display).
  11756.  
  11757.              4NT    /X:  Display both the short (8-character name plus 3-
  11758.                     character extension) and the long name of files on an
  11759.                     NTFS drive.
  11760.  
  11761.              4OS2,  /Z:  Display an HPFS or NTFS directory in FAT format.
  11762.              4NT    Long names will be truncated to 12 characters.  If the
  11763.                     name is longer than 12 characters, it will be followed
  11764.                     by a right arrow [a] to show that one or more
  11765.                     characters have been truncated.
  11766.  
  11767.  
  11768.  
  11769.  
  11770.  
  11771.  
  11772.  
  11773.  
  11774.  
  11775.  
  11776.  
  11777.  
  11778.  
  11779.  
  11780.  
  11781.  
  11782.  
  11783.  
  11784.  
  11785.  
  11786.  
  11787.  
  11788.  
  11789.  
  11790.  
  11791.  
  11792.  
  11793.  
  11794.  
  11795.         -------------------------------------------------------------------
  11796.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 204
  11797.  
  11798.                                                                        DIRS
  11799.         -------------------------------------------------------------------
  11800.  
  11801.         DIRS                                                          (New)
  11802.  
  11803.         Purpose:    Display the current directory stack.
  11804.  
  11805.         Format:     DIRS
  11806.  
  11807.                     See also:  PUSHD and POPD.
  11808.  
  11809.         Usage:      The PUSHD command adds the current default drive and
  11810.                     directory to the directory stack, a list that 4DOS,
  11811.                     4OS2, and 4DOS/NT maintain in memory.  The POPD
  11812.                     command removes the top entry of the directory stack
  11813.                     and makes that drive and directory the new default.
  11814.                     The DIRS command displays the contents of the
  11815.                     directory stack, with the most recent entries on top
  11816.                     (i.e., the next POPD will retrieve the first entry
  11817.                     that DIRS displays).
  11818.  
  11819.                     For example, to change directories and then display
  11820.                     the directory stack:
  11821.  
  11822.                          c:\> pushd c:\database
  11823.                          c:\database> pushd d:\wordp\memos
  11824.                          d:\wordp\memos> dirs
  11825.                          c:\database
  11826.                          c:\
  11827.  
  11828.                     The directory stack holds 255 characters, enough for
  11829.                     10 to 20 typical drive and directory entries.
  11830.  
  11831.  
  11832.  
  11833.  
  11834.  
  11835.  
  11836.  
  11837.  
  11838.  
  11839.  
  11840.  
  11841.  
  11842.  
  11843.  
  11844.  
  11845.  
  11846.  
  11847.  
  11848.  
  11849.  
  11850.  
  11851.         -------------------------------------------------------------------
  11852.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 205
  11853.  
  11854.                                                                          DO
  11855.         -------------------------------------------------------------------
  11856.  
  11857.         DO                                                            (New)
  11858.  
  11859.         Purpose:    Create loops in batch files.
  11860.  
  11861.         Format:     DO [n | FOREVER]
  11862.                          or
  11863.                     DO varname = start TO end [BY n]
  11864.                          or
  11865.                     DO [WHILE | UNTIL] condition
  11866.                     ...
  11867.                     [ITERATE]
  11868.                     [LEAVE]
  11869.                     ...
  11870.                     ENDDO
  11871.  
  11872.                     n, start, end: An integer between 0 and 2,147,483,647
  11873.                                  inclusive, or an internal variable or
  11874.                                  variable function that evaluates to such a
  11875.                                  value.
  11876.                     varname:     The environment variable that will hold
  11877.                                  the loop counter.
  11878.                     condition:   A test to determine if the loop should be
  11879.                                  executed.
  11880.  
  11881.         Usage:      DO can only be used in batch files.
  11882.  
  11883.                     DO can be used to create 3 different kinds of loops.
  11884.                     The first, introduced by DO n, is a counted loop.  The
  11885.                     batch file lines between DO and ENDDO are repeated n
  11886.                     times.  You can also specify "forever" for n if you
  11887.                     wish to create an endless loop.  For example:
  11888.  
  11889.                          do 5
  11890.                            beep
  11891.                          enddo
  11892.  
  11893.                     The second type of loop is similar to a "for loop" in
  11894.                     programming languages like BASIC.  DO creates an
  11895.                     environment variable, varname, and sets it equal to
  11896.                     the value start (if varname already exists in the
  11897.                     environment, it will be overwritten).  DO then begins
  11898.                     the loop process by comparing the value of varname
  11899.                     with the value of end.  If varname is less than or
  11900.                     equal to end, DO executes the batch file lines up to
  11901.                     the ENDDO.  Next, DO adds 1 to the value of varname,
  11902.                     or adds the value n if BY n is specified, and repeats
  11903.                     the compare and execute process until varname is
  11904.                     greater than end.  This example displays the even
  11905.                     numbers from 2 through 20:
  11906.  
  11907.         -------------------------------------------------------------------
  11908.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 206
  11909.  
  11910.                                                                          DO
  11911.         -------------------------------------------------------------------
  11912.  
  11913.                          do i = 2 to 20 by 2
  11914.                            echo %i
  11915.                          enddo
  11916.  
  11917.                     DO can also count down, rather than up.  If n is
  11918.                     negative, varname will decrease by n with each loop,
  11919.                     and the loop will stop when varname is less than end.
  11920.                     For example, to display the even numbers from 2
  11921.                     through 20 in reverse order, replace the first line of
  11922.                     the example above with:
  11923.  
  11924.                          do i = 20 to 2 by -2
  11925.  
  11926.                     The third type of loop is called a "while loop" or
  11927.                     "until loop."
  11928.  
  11929.                     DO WHILE executes the lines between DO and ENDDO as
  11930.                     long as the condition is true.  The loop ends when the
  11931.                     condition becomes false.  The condition is tested at
  11932.                     the start of the loop, so if the condition is
  11933.                     initially false the lines between DO and ENDDO will
  11934.                     never be executed.
  11935.  
  11936.                     DO UNTIL continues to execute the lines between DO and
  11937.                     ENDDO until the condition becomes true.  The condition
  11938.                     is tested at the end of the loop, so if the condition
  11939.                     is initially true the lines between DO and ENDDO will
  11940.                     be executed once, then the loop will stop.
  11941.  
  11942.                     Two special commands, ITERATE and LEAVE, can only be
  11943.                     used inside a DO / ENDDO loop.  ITERATE ignores the
  11944.                     remaining lines inside the loop and returns to the
  11945.                     beginning of loop for another iteration (unless DO
  11946.                     determines that the loop is finished).  LEAVE exits
  11947.                     from the current DO loop and continues with the line
  11948.                     following ENDDO.  Both ITERATE and LEAVE are most
  11949.                     often used in an IF or IFF command (see pages 238 and
  11950.                     244):
  11951.  
  11952.                          do while "%var" != "%val1"
  11953.                            ...
  11954.                            if "%var" == "%val2" leave
  11955.                          enddo
  11956.  
  11957.                     You can nest DO loops up to 15 levels deep.
  11958.  
  11959.                ! ## You can exit from all DO / ENDDO loops by using GOTO
  11960.                     to a line past the last ENDDO.  However, be sure to
  11961.                     read the cautionary notes about GOTO and DO under the
  11962.  
  11963.         -------------------------------------------------------------------
  11964.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 207
  11965.  
  11966.                                                                          DO
  11967.         -------------------------------------------------------------------
  11968.  
  11969.                     GOTO command (page 232) before using a GOTO inside any
  11970.                     DO loop.
  11971.  
  11972.  
  11973.  
  11974.  
  11975.  
  11976.  
  11977.  
  11978.  
  11979.  
  11980.  
  11981.  
  11982.  
  11983.  
  11984.  
  11985.  
  11986.  
  11987.  
  11988.  
  11989.  
  11990.  
  11991.  
  11992.  
  11993.  
  11994.  
  11995.  
  11996.  
  11997.  
  11998.  
  11999.  
  12000.  
  12001.  
  12002.  
  12003.  
  12004.  
  12005.  
  12006.  
  12007.  
  12008.  
  12009.  
  12010.  
  12011.  
  12012.  
  12013.  
  12014.  
  12015.  
  12016.  
  12017.  
  12018.  
  12019.         -------------------------------------------------------------------
  12020.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 208
  12021.  
  12022.                                                   [4OS2, 4DOS/NT]     DPATH
  12023.         -------------------------------------------------------------------
  12024.  
  12025.         DPATH        [4OS2, 4DOS/NT]                           (Compatible)
  12026.  
  12027.         Purpose:    Specify the subdirectories which applications will
  12028.                     search to find files that are not in the current
  12029.                     directory.
  12030.  
  12031.         Format:     DPATH [directory[;directory...]]
  12032.  
  12033.                     directory:  The full name of a directory to include in
  12034.                     the DPATH (data path) setting.
  12035.  
  12036.                     See also:  PATH, SET, and ESET.
  12037.  
  12038.         Usage:      When most OS/2 and Windows NT applications try to open
  12039.                     a data file, they look for the file in the current
  12040.                     directory first.  If they fail to find the file there,
  12041.                     they search each of the directories in the DPATH
  12042.                     setting in the order that they are included.  Internal
  12043.                     commands like TYPE do not search the DPATH directories
  12044.                     for files.
  12045.  
  12046.                     For example, the following DPATH command directs
  12047.                     applications to look for files in this order:  the
  12048.                     current directory, the INIT directory on C, and the
  12049.                     CONFIG directory on D:
  12050.  
  12051.                          [c:\] dpath c:\init;d:\config
  12052.  
  12053.                     The listing of directories to be searched can be set
  12054.                     or viewed with DPATH.  The list is stored as an
  12055.                     environment string with the variable name DPATH, and
  12056.                     can also be set or viewed with the SET command and
  12057.                     edited with the ESET command.
  12058.  
  12059.                     Directory names in the DPATH must be separated with
  12060.                     semicolons [;].  4OS2 and 4DOS/NT will not shift
  12061.                     directory names in the DPATH to upper case as they do
  12062.                     with those in the PATH setting.  If you want the names
  12063.                     in the DPATH to be in upper case you must enter them
  12064.                     that way.
  12065.  
  12066.                     If you enter DPATH with no parameters, 4OS2 and 4DOS
  12067.                     /NT display the current DPATH search list.
  12068.  
  12069.  
  12070.  
  12071.  
  12072.  
  12073.  
  12074.  
  12075.         -------------------------------------------------------------------
  12076.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 209
  12077.  
  12078.                                                                     DRAWBOX
  12079.         -------------------------------------------------------------------
  12080.  
  12081.         DRAWBOX                                                       (New)
  12082.  
  12083.         Purpose:    Draw a box on the screen.
  12084.  
  12085.         Format:     DRAWBOX ulrow ulcol lrrow lrcol style [BRIght] [BLInk]
  12086.                          fg ON [BRIght] bg [FILl bgfill] [ZOOm] [SHAdow]
  12087.  
  12088.                     ulrow:       Row for upper left corner
  12089.                     ulcol:       Column for upper left corner
  12090.                     lrrow:       Row for lower right corner
  12091.                     lrcol:       Column for lower right corner
  12092.                     style:       Box drawing style:
  12093.                                    0  No lines (box is drawn with blanks)
  12094.                                    1  Single line
  12095.                                    2  Double line
  12096.                                    3  Single line top and bottom, double on
  12097.                                       sides
  12098.                                    4  Double line top and bottom, single on
  12099.                                       sides
  12100.                     fg:          Foreground character color
  12101.                     bg:          Background character color
  12102.                     bgfill:      Background fill color (for the inside of
  12103.                                  the box)
  12104.  
  12105.                     See also:  DRAWHLINE and DRAWVLINE.
  12106.  
  12107.         Usage:      DRAWBOX is useful for creating attractive screen
  12108.                     displays in batch files.
  12109.  
  12110.                     For example, to draw a box around the entire screen
  12111.                     with bright white lines on a blue background:
  12112.  
  12113.                          drawbox 0 0 24 79 1 bri whi on blu fill blu
  12114.  
  12115.                     See page 26 for details about colors and color names,
  12116.                     and notes on the use of bright background colors.
  12117.  
  12118.                     If you use ZOOM, the box appears to grow in steps to
  12119.                     its final size.  The speed of the zoom operation
  12120.                     depends on the speed of your video system.
  12121.  
  12122.                     If you use SHADOW, a drop shadow is created by
  12123.                     changing the characters in the row under the box and
  12124.                     the 2 columns to the right of the box to normal
  12125.                     intensity text with a black background (this will make
  12126.                     characters displayed in black disappear entirely).
  12127.  
  12128.  
  12129.  
  12130.  
  12131.         -------------------------------------------------------------------
  12132.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 210
  12133.  
  12134.                                                                     DRAWBOX
  12135.         -------------------------------------------------------------------
  12136.  
  12137.                     The row and column values are zero-based, so on a
  12138.                     standard 25 line by 80 column display, valid rows are
  12139.                     0 - 24 and valid columns are 0 - 79.
  12140.  
  12141.                     DRAWBOX checks for valid row and column values, and
  12142.                     displays a "Usage" error message if any values are out
  12143.                     of range.
  12144.  
  12145.                     Unlike DRAWHLINE and DRAWVLINE, DRAWBOX does not
  12146.                     automatically connect boxes to existing lines on the
  12147.                     screen with the proper connector characters.  If you
  12148.                     want to draw lines inside a box and have the proper
  12149.                     connectors drawn automatically, draw the box first,
  12150.                     then use DRAWHLINE and DRAWVLINE to draw the lines.
  12151.  
  12152.                     DRAWBOX uses the standard line and box drawing
  12153.                     characters in the U.S. English extended ASCII
  12154.                     character set.  If your system is configured for a
  12155.                     different country or language, the box may not appear
  12156.                     on your screen as you expect.
  12157.  
  12158.              4DOS## DRAWBOX normally writes text directly to the screen.
  12159.                     If you have an unusual display adapter which does not
  12160.                     support direct video output, see the OutputBIOS
  12161.                     directive on page 143.
  12162.  
  12163.  
  12164.  
  12165.  
  12166.  
  12167.  
  12168.  
  12169.  
  12170.  
  12171.  
  12172.  
  12173.  
  12174.  
  12175.  
  12176.  
  12177.  
  12178.  
  12179.  
  12180.  
  12181.  
  12182.  
  12183.  
  12184.  
  12185.  
  12186.  
  12187.         -------------------------------------------------------------------
  12188.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 211
  12189.  
  12190.                                                                   DRAWHLINE
  12191.         -------------------------------------------------------------------
  12192.  
  12193.         DRAWHLINE                                                     (New)
  12194.  
  12195.         Purpose:    Draw a horizontal line on the screen.
  12196.  
  12197.         Format:     DRAWHLINE row column len style [BRIght] [BLInk]
  12198.                          fg ON [BRIght] bg
  12199.  
  12200.                     row:         Starting row
  12201.                     column:      Starting column
  12202.                     len:         Length of line
  12203.                     style:       Line drawing style:
  12204.                                    1  Single line
  12205.                                    2  Double line
  12206.                     fg:          Foreground character color
  12207.                     bg:          Background character color
  12208.  
  12209.                     See also:  DRAWBOX and DRAWVLINE.
  12210.  
  12211.         Usage:      DRAWHLINE is useful for creating attractive screen
  12212.                     displays in batch files.  It detects other lines and
  12213.                     boxes on the display, and creates the appropriate
  12214.                     connector characters when possible (not all types of
  12215.                     lines can be connected with the available characters).
  12216.  
  12217.                     For example, the following command draws a double line
  12218.                     along the top row of the display with green characters
  12219.                     on a blue background:
  12220.  
  12221.                          drawhline 0 0 80 2 green on blue
  12222.  
  12223.                     The row and column values are zero-based, so on a
  12224.                     standard 25 line by 80 column display, valid rows are
  12225.                     0 - 24 and valid columns are 0 - 79.  DRAWHLINE checks
  12226.                     for a valid row and column, and displays a "Usage"
  12227.                     error message if either value is out of range.
  12228.  
  12229.                     See page 26 for details about colors and color names,
  12230.                     and notes on the use of bright background colors.
  12231.  
  12232.                     DRAWHLINE uses the standard line and box drawing
  12233.                     characters in the U.S. English extended ASCII
  12234.                     character set.  If your system is configured for a
  12235.                     different country or language, the line may not appear
  12236.                     on your screen as you expect.
  12237.  
  12238.              4DOS## DRAWHLINE normally writes text directly to the screen.
  12239.                     If you have an unusual display adapter which does not
  12240.                     support direct video output, see the OutputBIOS
  12241.                     directive on page 143.
  12242.  
  12243.         -------------------------------------------------------------------
  12244.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 212
  12245.  
  12246.                                                                   DRAWVLINE
  12247.         -------------------------------------------------------------------
  12248.  
  12249.         DRAWVLINE                                                     (New)
  12250.  
  12251.         Purpose:    Draw a vertical line on the screen.
  12252.  
  12253.         Format:     DRAWVLINE row column len style [BRIght][BLInk]
  12254.                          fg ON [BRIght] bg
  12255.  
  12256.                     row:         Starting row
  12257.                     column:      Starting column
  12258.                     len:         Length of line
  12259.                     style:       Line drawing style:
  12260.                                    1  Single line
  12261.                                    2  Double line
  12262.                     fg:          Foreground character color
  12263.                     bg:          Background character color
  12264.  
  12265.                     See also:  DRAWBOX and DRAWHLINE.
  12266.  
  12267.         Usage:      DRAWVLINE is useful for creating attractive screen
  12268.                     displays in batch files.  It detects other lines and
  12269.                     boxes on the display, and creates the appropriate
  12270.                     connector characters when possible (not all types of
  12271.                     lines can be connected with the available characters).
  12272.  
  12273.                     For example, to draw a double width line along the
  12274.                     left margin of the display with bright red characters
  12275.                     on a black background:
  12276.  
  12277.                          drawvline 0 0 25 2 bright red on black
  12278.  
  12279.                     The row and column values are zero-based, so on a
  12280.                     standard 25 line by 80 column display, valid rows are
  12281.                     0 - 24 and valid columns are 0 - 79.  DRAWVLINE checks
  12282.                     for a valid row and column, and displays a "Usage"
  12283.                     error message if either value is out of range.
  12284.  
  12285.                     See page 26 for details about colors and color names,
  12286.                     and notes on the use of bright background colors.
  12287.  
  12288.                     DRAWVLINE uses the standard line and box drawing
  12289.                     characters in the U.S. English extended ASCII
  12290.                     character set.  If your system is configured for a
  12291.                     different country or language, the line may not appear
  12292.                     on your screen as you expect.
  12293.  
  12294.              4DOS## DRAWVLINE normally writes text directly to the screen.
  12295.                     If you have an unusual display adapter which does not
  12296.                     support direct video output, see the OutputBIOS
  12297.                     directive on page 143.
  12298.  
  12299.         -------------------------------------------------------------------
  12300.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 213
  12301.  
  12302.                                                                        ECHO
  12303.         -------------------------------------------------------------------
  12304.  
  12305.         ECHO                                                     (Enhanced)
  12306.  
  12307.         Purpose:    Display a message, enable or disable batch file or
  12308.                     command-line echoing, or display the echo status.
  12309.  
  12310.         Format:     ECHO [ON | OFF | message]
  12311.  
  12312.                     message:  Text to display.
  12313.  
  12314.                     See also:  ECHOS, SCREEN, SCRPUT, SETDOS and TEXT.
  12315.  
  12316.         Usage:      4DOS, 4OS2, and 4DOS/NT have a separate echo
  12317.                     capability for batch files and for the command line.
  12318.                     The command-line ECHO state is independent of the
  12319.                     batch file ECHO state; changing ECHO in a batch file
  12320.                     has no effect on the display at the command prompt,
  12321.                     and vice versa.
  12322.  
  12323.                     To see the current echo state, use the ECHO command
  12324.                     with no arguments.  This displays either the batch
  12325.                     file or command-line echo state, depending on where
  12326.                     the ECHO command is performed.
  12327.  
  12328.                     In a batch file, if you turn ECHO on, each line of the
  12329.                     file is displayed before it is executed.  If you turn
  12330.                     ECHO off, each line is executed without being
  12331.                     displayed.  ECHO can also be used in a batch file to
  12332.                     display a message on the screen.  Regardless of the
  12333.                     ECHO state, a batch file line that begins with the [@]
  12334.                     character will not be displayed.  To turn off batch
  12335.                     file echoing, without displaying the ECHO command, use
  12336.                     this line:
  12337.  
  12338.                          @echo off
  12339.  
  12340.                     ECHO commands in a batch file will send messages to
  12341.                     the screen while the batch file executes, even if ECHO
  12342.                     is set OFF.  For example, this line will display a
  12343.                     message in a batch file:
  12344.  
  12345.                          echo Processing your print files...
  12346.  
  12347.                     If you want to echo a blank line from within a batch
  12348.                     file, enter:
  12349.  
  12350.                          echo.
  12351.  
  12352.                     You cannot use the command separator character ([^] in
  12353.                     4DOS or [&] in 4OS2 and 4DOS/NT) or the redirection
  12354.  
  12355.         -------------------------------------------------------------------
  12356.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 214
  12357.  
  12358.                                                                        ECHO
  12359.         -------------------------------------------------------------------
  12360.  
  12361.                     symbols (| > <) in an ECHO message, unless you enclose
  12362.                     them in quotes (see page 118) or precede them with the
  12363.                     escape character (see page 71).
  12364.  
  12365.                     ECHO defaults to ON in batch files.  The current ECHO
  12366.                     state is inherited by called batch files.  You can
  12367.                     change the default setting to ECHO OFF with the SETDOS
  12368.                     /V0 command or the BatchEcho directive in the .INI
  12369.                     file (see page 131).
  12370.  
  12371.                     If you turn the command-line ECHO on, each command
  12372.                     will be displayed before it is executed.  This will
  12373.                     let you see the command line after expansion of all
  12374.                     aliases and variables.  The command-line ECHO is most
  12375.                     useful when you are learning how to use advanced
  12376.                     features.  This example will turn command-line echoing
  12377.                     on:
  12378.  
  12379.                          c:\> echo on
  12380.  
  12381.                     ECHO defaults to OFF at the command line.
  12382.  
  12383.  
  12384.  
  12385.  
  12386.  
  12387.  
  12388.  
  12389.  
  12390.  
  12391.  
  12392.  
  12393.  
  12394.  
  12395.  
  12396.  
  12397.  
  12398.  
  12399.  
  12400.  
  12401.  
  12402.  
  12403.  
  12404.  
  12405.  
  12406.  
  12407.  
  12408.  
  12409.  
  12410.  
  12411.         -------------------------------------------------------------------
  12412.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 215
  12413.  
  12414.                                                                       ECHOS
  12415.         -------------------------------------------------------------------
  12416.  
  12417.         ECHOS                                                         (New)
  12418.  
  12419.         Purpose:    Display a message without a trailing carriage return
  12420.                     and line feed.
  12421.  
  12422.         Format:     ECHOS message
  12423.  
  12424.                     See also:  ECHO, SCREEN, SCRPUT, TEXT, and VSCRPUT.
  12425.  
  12426.         Usage:      ECHOS is useful for text output when you don't want to
  12427.                     add a carriage return / linefeed pair at the end of
  12428.                     the line.  For example, you can use ECHOS when you
  12429.                     need to redirect control sequences to your printer;
  12430.                     this example sends the sequence Esc P to the printer
  12431.                     on LPT1:
  12432.  
  12433.                          c:\> echos -eP > lpt1:
  12434.  
  12435.                     You cannot use the command separator character ([^] in
  12436.                     4DOS and [&] in 4OS2 and 4DOS/NT) or the redirection
  12437.                     symbols [|><] in an ECHOS message, unless you enclose
  12438.                     them in quotes (see page 118) or precede them with the
  12439.                     escape character (see page 71).
  12440.  
  12441.                  ## ECHOS does not translate or modify the message text.
  12442.                     For example, carriage return characters are not
  12443.                     translated to CR/LF pairs.  ECHOS sends only the
  12444.                     characters you enter (after escape character and back-
  12445.                     quote processing).  The only character you cannot put
  12446.                     into an ECHOS message is the NUL character (ASCII 0).
  12447.  
  12448.  
  12449.  
  12450.  
  12451.  
  12452.  
  12453.  
  12454.  
  12455.  
  12456.  
  12457.  
  12458.  
  12459.  
  12460.  
  12461.  
  12462.  
  12463.  
  12464.  
  12465.  
  12466.  
  12467.         -------------------------------------------------------------------
  12468.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 216
  12469.  
  12470.                                                                    ENDLOCAL
  12471.         -------------------------------------------------------------------
  12472.  
  12473.         ENDLOCAL                                                      (New)
  12474.  
  12475.         Purpose:    Restore the saved disk drive, directory, environment,
  12476.                     and alias list.
  12477.  
  12478.         Format:     ENDLOCAL
  12479.  
  12480.                     See also:  SETLOCAL.
  12481.  
  12482.         ##  Usage:  The SETLOCAL command in a batch file saves the current
  12483.                     disk drive, default directory, all environment
  12484.                     variables, and the alias list.  ENDLOCAL restores
  12485.                     everything that was saved by the previous SETLOCAL
  12486.                     command.
  12487.  
  12488.                     For example, this batch file fragment saves the drive,
  12489.                     current working directory, and environment variables,
  12490.                     removes all aliases so that any user aliases will not
  12491.                     affect batch file commands, changes the drive and
  12492.                     directory, sets some environment variables, runs the
  12493.                     program TEST1, and then restores the original values:
  12494.  
  12495.                          setlocal
  12496.                          unalias *
  12497.                          cdd d:\test
  12498.                          set path=c:\;c:\dos;c:\util
  12499.                          set lib=d:\lib
  12500.                          test1
  12501.                          endlocal
  12502.  
  12503.                     SETLOCAL and ENDLOCAL can only be used in batch files,
  12504.                     not in aliases or from the command line.
  12505.  
  12506.  
  12507.  
  12508.  
  12509.  
  12510.  
  12511.  
  12512.  
  12513.  
  12514.  
  12515.  
  12516.  
  12517.  
  12518.  
  12519.  
  12520.  
  12521.  
  12522.  
  12523.         -------------------------------------------------------------------
  12524.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 217
  12525.  
  12526.                                                                        ESET
  12527.         -------------------------------------------------------------------
  12528.  
  12529.         ESET                                                          (New)
  12530.  
  12531.         Purpose:    Edit environment variables and aliases.
  12532.  
  12533.         Format:     ESET [/A /M] variable name...
  12534.  
  12535.                     variable name: The name of an environment variable or
  12536.                                  alias to edit.
  12537.  
  12538.                     /A(lias)                 /M(aster environment)
  12539.  
  12540.                     See also:  ALIAS, UNALIAS, SET, and UNSET.
  12541.  
  12542.         Usage:      ESET allows you to edit environment variables and
  12543.                     aliases using line editing commands (see page 34).
  12544.  
  12545.                     For example, to edit the executable file search path:
  12546.  
  12547.                          c:\> eset path
  12548.                          path=c:\;c:\dos;c:\util
  12549.  
  12550.                     To create and then edit an alias:
  12551.  
  12552.                          c:\> alias d = dir /d/j/p
  12553.                          c:\> eset d
  12554.                          d=dir /d/j/p
  12555.  
  12556.                     ESET will search for environment variables first and
  12557.                     then aliases.  If you have an environment variable and
  12558.                     an alias with the same name, ESET will edit the
  12559.                     environment variable and ignore the alias unless you
  12560.                     use the /A option.
  12561.  
  12562.                     Environment variable and alias names are normally
  12563.                     limited to 80 characters, and their contents to 255
  12564.                     characters in 4DOS, or 1,023 characters in 4OS2 and
  12565.                     4DOS/NT.  However, if you use special techniques to
  12566.                     create a longer environment variable, ESET will edit
  12567.                     it provided the variable contains no more than 511
  12568.                     characters of text in 4DOS, or 2,047 characters in
  12569.                     4OS2 and 4DOS/NT.
  12570.  
  12571.                     If you have enabled global aliases (see page 163), any
  12572.                     changes made to an alias with ESET will immediately
  12573.                     affect all other copies of the command processor which
  12574.                     are using the same alias list.
  12575.  
  12576.         Option:  ## /A(lias):  Edit the named alias even if an environment
  12577.                     variable of the same name exists.  If you have an
  12578.  
  12579.         -------------------------------------------------------------------
  12580.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 218
  12581.  
  12582.                                                                        ESET
  12583.         -------------------------------------------------------------------
  12584.  
  12585.                     alias and an environment variable with the same name,
  12586.                     you must use this switch to be able to edit the alias.
  12587.  
  12588.              4DOS   /M(aster environment):  Edit an environment variable
  12589.                     in the master environment rather than the local
  12590.                     environment.  This option is only useful from a
  12591.                     secondary command shell (for example, when an
  12592.                     application has "shelled to DOS").  /M only works for
  12593.                     environment variables; it cannot be used to edit the
  12594.                     primary shell's aliases.
  12595.  
  12596.  
  12597.  
  12598.  
  12599.  
  12600.  
  12601.  
  12602.  
  12603.  
  12604.  
  12605.  
  12606.  
  12607.  
  12608.  
  12609.  
  12610.  
  12611.  
  12612.  
  12613.  
  12614.  
  12615.  
  12616.  
  12617.  
  12618.  
  12619.  
  12620.  
  12621.  
  12622.  
  12623.  
  12624.  
  12625.  
  12626.  
  12627.  
  12628.  
  12629.  
  12630.  
  12631.  
  12632.  
  12633.  
  12634.  
  12635.         -------------------------------------------------------------------
  12636.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 219
  12637.  
  12638.                                                                      EXCEPT
  12639.         -------------------------------------------------------------------
  12640.  
  12641.         EXCEPT                                                        (New)
  12642.  
  12643.         Purpose:    Perform a command on all available files except those
  12644.                     specified.
  12645.  
  12646.         Format:     EXCEPT (file) command
  12647.  
  12648.                     file:        The file or files to exclude from the
  12649.                                  command.
  12650.                     command:     The command to execute, including all
  12651.                                  appropriate arguments and switches.
  12652.  
  12653.                     See also:  ATTRIB.
  12654.  
  12655.         File Select:Supports extended wildcards, ranges, multiple file
  12656.                     names, and include lists (see pages 57 - 65).  Date,
  12657.                     time, or size ranges must appear immediately after the
  12658.                     EXCEPT keyword.
  12659.  
  12660.         Usage:      EXCEPT provides a means of executing a command on a
  12661.                     group of files and/or subdirectories, and excluding a
  12662.                     subgroup from the operation.  The command can be an
  12663.                     internal command or alias, an external command, or a
  12664.                     batch file.
  12665.  
  12666.                     You may use wildcards to specify the files to exclude
  12667.                     from the command.  The first example erases all the
  12668.                     files in the current directory except those beginning
  12669.                     with MEMO, and those whose extension is .WKS.  The
  12670.                     second example copies all the files and subdirectories
  12671.                     on drive C to drive D except those in C:\MSC and
  12672.                     C:\DOS, using the COPY command:
  12673.  
  12674.                          c:\> except (memo*.* *.wks) erase *.*
  12675.                          c:\> except (c:\msc c:\dos) copy c:\*.* d:\ /s
  12676.  
  12677.                  ## Date, time, and size ranges can be used immediately
  12678.                     after the word EXCEPT to further qualify which files
  12679.                     should be excluded from the command.  If the command
  12680.                     is an internal command that supports ranges, an
  12681.                     independent range can also be used in the command
  12682.                     itself.
  12683.  
  12684.                ! ## EXCEPT prevents operations on the specified file(s) by
  12685.                     setting the hidden attribute, performing the command,
  12686.                     and then clearing the hidden attribute.  If the
  12687.                     command is aborted in an unusual way, you may need to
  12688.                     use the ATTRIB command to remove the hidden attribute
  12689.                     from the file(s).
  12690.  
  12691.         -------------------------------------------------------------------
  12692.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 220
  12693.  
  12694.                                                                      EXCEPT
  12695.         -------------------------------------------------------------------
  12696.  
  12697.                ! ## EXCEPT will not work with programs or commands that
  12698.                     ignore the hidden attribute or which work explicitly
  12699.                     with hidden files, including DEL /Z, and the /H
  12700.                     (process hidden files) switch available in some 4DOS,
  12701.                     4OS2, and 4DOS/NT file processing commands.
  12702.  
  12703.                  ## You can use command grouping (see page 69) to execute
  12704.                     multiple commands with a single EXCEPT.  For example,
  12705.                     the following command copies all files in the current
  12706.                     directory whose extensions begin with .DA, except the
  12707.                     .DAT files, to the D:\SAVE directory, then changes the
  12708.                     first two characters of the extension of the copied
  12709.                     files to .SA.  This example should be entered on one
  12710.                     line:
  12711.  
  12712.                          c:\data> except (*.dat) (copy *.da* d:\save ^
  12713.                                   ren *.da* *.sa*)
  12714.  
  12715.                  ## If you use filename completion (see page 40) to enter
  12716.                     the filenames inside the parentheses, type a space
  12717.                     after the open parenthesis before entering a partial
  12718.                     filename or pressing Tab.  Otherwise, the command-line
  12719.                     editor will treat the open parenthesis as the first
  12720.                     character of the filename to be completed.
  12721.  
  12722.           4DOS ! ## If you receive a stack overflow error when using
  12723.                     EXCEPT in complex, nested command sequences, see the
  12724.                     notes under the StackSize directive on page 143.
  12725.  
  12726.  
  12727.  
  12728.  
  12729.  
  12730.  
  12731.  
  12732.  
  12733.  
  12734.  
  12735.  
  12736.  
  12737.  
  12738.  
  12739.  
  12740.  
  12741.  
  12742.  
  12743.  
  12744.  
  12745.  
  12746.  
  12747.         -------------------------------------------------------------------
  12748.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 221
  12749.  
  12750.                                                                        EXIT
  12751.         -------------------------------------------------------------------
  12752.  
  12753.         EXIT                                                     (Enhanced)
  12754.  
  12755.         Purpose:    Return from the command processor.
  12756.  
  12757.         Format:     EXIT [value]
  12758.  
  12759.                     value:  The exit code to return (0 - 255).
  12760.  
  12761.         Usage:      EXIT terminates the current copy of the command
  12762.                     processor.  Use it to return to an application when
  12763.                     you have "shelled out" to work at the prompt, or to
  12764.                     end a command-line session under Windows, OS/2, or
  12765.                     Windows NT.
  12766.  
  12767.                     To close the session, or to return to the application
  12768.                     that started the command processor, type:
  12769.  
  12770.                          c:\> exit
  12771.  
  12772.                  ## If you specify a value, EXIT will return that value to
  12773.                     the program that started the command processor.  For
  12774.                     example:
  12775.  
  12776.                          c:\> exit 255
  12777.  
  12778.                  ## The value is a number you can use to inform the
  12779.                     program of some result, such as the success or failure
  12780.                     of a batch file.  This feature is most useful for
  12781.                     systems which use batch files to automate their
  12782.                     operation, such as bulletin boards, or custom
  12783.                     application programs like databases that shell to the
  12784.                     command processor to perform certain tasks.
  12785.  
  12786.              4DOS## You cannot EXIT from the primary 4DOS shell under DOS.
  12787.                     If EXIT does not seem to have any effect, you are
  12788.                     probably in the primary shell.
  12789.  
  12790.  
  12791.  
  12792.  
  12793.  
  12794.  
  12795.  
  12796.  
  12797.  
  12798.  
  12799.  
  12800.  
  12801.  
  12802.  
  12803.         -------------------------------------------------------------------
  12804.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 222
  12805.  
  12806.                                                                         FOR
  12807.         -------------------------------------------------------------------
  12808.  
  12809.         FOR                                                      (Enhanced)
  12810.  
  12811.         Purpose:    Repeat a command for several values of a variable.
  12812.  
  12813.         Format:     FOR [/A[[:][-]rhsda]] %var IN ([@]set) [DO] command...
  12814.  
  12815.                     %var:        The variable to be used in the command
  12816.                                  ("FOR variable").
  12817.                     set:         A set of values for the variable.
  12818.                     command:     A command or group of commands to be
  12819.                                  executed for each value of the variable.
  12820.  
  12821.                     /A(ttribute select)
  12822.  
  12823.         File Select:Supports extended wildcards, ranges, multiple file
  12824.                     names, and include lists (see pages 57 - 65).  Date,
  12825.                     time, or size ranges must appear immediately after the
  12826.                     FOR keyword.
  12827.  
  12828.         Usage:      FOR begins by creating a set.  It then executes a
  12829.                     command for every member of the set.  The command can
  12830.                     be an internal command, an alias, an external command,
  12831.                     or a batch file.
  12832.  
  12833.                     Normally, the set is a list of files specified with
  12834.                     wildcards.  For example, if you use this line in a
  12835.                     batch file:
  12836.  
  12837.                          for %x in (*.txt) do list %x
  12838.  
  12839.                     then LIST will be executed once for each file in the
  12840.                     current directory with the extension .TXT.  The FOR
  12841.                     variable %x is set equal to each of the file names in
  12842.                     turn, then the LIST command is executed for each file.
  12843.                     (You could do the same thing more easily with a simple
  12844.                     LIST *.TXT.  We used FOR here so you could get a feel
  12845.                     for how it operates, using a simple example.)
  12846.  
  12847.                     The set can include multiple files or an include list,
  12848.                     like this:
  12849.  
  12850.                          for %x in (d:\*.txt;*.doc;*.asc) do type %x
  12851.  
  12852.                     If the set includes filenames, the file list can be
  12853.                     further refined by using date, time, and size ranges
  12854.                     (see page 60).  The range must be placed immediately
  12855.                     after the word FOR.  The range will be ignored if no
  12856.                     wildcards are used inside the parentheses.  For
  12857.  
  12858.  
  12859.         -------------------------------------------------------------------
  12860.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 223
  12861.  
  12862.                                                                         FOR
  12863.         -------------------------------------------------------------------
  12864.  
  12865.                     example, this set is made up of all of the *.TXT files
  12866.                     that were created or updated on October 4, 1993:
  12867.  
  12868.                          for /[d10-4-93,+0] %x in (*.txt) do ...
  12869.  
  12870.                     If the command is an internal command that supports
  12871.                     ranges, an independent range can also be used in the
  12872.                     command itself.
  12873.  
  12874.                     The set can also be made up of text instead of file
  12875.                     names.  For example, to display the free space on
  12876.                     drives C:, D:, and E:, you could use:
  12877.  
  12878.                          for %drive in (c d e) do free %drive:
  12879.  
  12880.                     When the set is made up of text or several separate
  12881.                     file names (not an include list), the elements must be
  12882.                     separated by spaces, tabs, commas, or the switch
  12883.                     character (normally a slash [/]).
  12884.  
  12885.                  ## You can also set the FOR variable equal to each line
  12886.                     in a file by placing an [@] in front of the file name.
  12887.                     If you have a file called DRIVES.TXT that contains a
  12888.                     list of drives on your computer, one drive name per
  12889.                     line (with a ":" after each drive letter), you can
  12890.                     print the free space on each drive this way:
  12891.  
  12892.                          for %d in (@drives.txt) do free %d > prn
  12893.  
  12894.                  ## Because the [@] is also a valid filename character,
  12895.                     FOR first checks to see if the file exists with the
  12896.                     [@] in its name (i.e., a file named @DRIVES.TXT).  If
  12897.                     so, the filename is treated as a normal argument.  If
  12898.                     it doesn't exist, FOR uses the filename (without the
  12899.                     [@]) as the file from which to retrieve text.
  12900.  
  12901.                  ## You can use either % or %% in front of the variable
  12902.                     name.  Either form will work, whether the FOR command
  12903.                     is typed from the command line or is part of an alias
  12904.                     or batch file (some of the traditional command
  12905.                     processors require a single % if FOR is used at the
  12906.                     command line, but use %% if it is used in a batch
  12907.                     file).  The variable name can be up to 80 characters
  12908.                     long.  The word DO is optional.
  12909.  
  12910.                  ## If you use a single-character FOR variable name, that
  12911.                     name is given priority over any environment variable
  12912.                     which starts with the same letter, in order to
  12913.                     maintain compatibility with the traditional FOR
  12914.  
  12915.         -------------------------------------------------------------------
  12916.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 224
  12917.  
  12918.                                                                         FOR
  12919.         -------------------------------------------------------------------
  12920.  
  12921.                     command.  For example, the following command tries to
  12922.                     add a: and b: to the end of the PATH, but will not
  12923.                     work as intended:
  12924.  
  12925.                          c:\> for %p in (a: b:) do path %path;%p
  12926.  
  12927.                     The "%p" in "%path" will be interpreted as the FOR
  12928.                     variable %p followed by the text "ath", which is not
  12929.                     what was intended.  To get around this, use a
  12930.                     different letter or a longer name for the FOR
  12931.                     variable, or use square brackets around the variable
  12932.                     name (see page 94).
  12933.  
  12934.                  ## The following example uses FOR with variable functions
  12935.                     to delete the .BAK files for which a corresponding
  12936.                     .TXT file exists in the current directory (this should
  12937.                     be entered on one line):
  12938.  
  12939.                          c:\docs> for %file in (*.txt) do del
  12940.                                   %@name[%file].bak
  12941.  
  12942.                  ## You can use command grouping (see page 69) to execute
  12943.                     multiple commands for each element in the list.  For
  12944.                     example, the following command copies each .WKQ file
  12945.                     in the current directory to the D:\WKSAVE directory,
  12946.                     then changes the extension of each file in the current
  12947.                     directory to .SAV.  This should be entered on one
  12948.                     line:
  12949.  
  12950.                          c:\text> for %file in (*.wkq) do (copy %file
  12951.                                   d:\wksave\ ^ ren %file *.sav)
  12952.  
  12953.                     (Use an ampersand [&] as the separator character if
  12954.                     you are using 4OS2 or 4DOS/NT.)
  12955.  
  12956.                  ## In a batch file you can use GOSUB to execute a
  12957.                     subroutine for every element in the set.  Within the
  12958.                     subroutine, the FOR variable can be used just like any
  12959.                     environment variable.  This is a convenient way to
  12960.                     execute a complex sequence of commands for every
  12961.                     element in the set without CALLing another batch file.
  12962.  
  12963.                  ## One unusual use of FOR is to execute a collection of
  12964.                     batch files or other commands with the same parameter.
  12965.                     For example, you might want to have three batch files
  12966.                     all operate on the same data file.  The FOR command
  12967.                     could look like this (enter this on one line):
  12968.  
  12969.                          c:\> for %cmd in (filetest fileform fileprnt)
  12970.  
  12971.         -------------------------------------------------------------------
  12972.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 225
  12973.  
  12974.                                                                         FOR
  12975.         -------------------------------------------------------------------
  12976.  
  12977.                               do %cmd datafile
  12978.  
  12979.                     This line will expand to three separate commands:
  12980.  
  12981.                          filetest datafile
  12982.                          fileform datafile
  12983.                          fileprnt datafile
  12984.  
  12985.                  ## The variable that FOR uses (the %CMD in the example
  12986.                     above) is created in the environment and then erased
  12987.                     when the FOR command is done.  However, for
  12988.                     compatibility with COMMAND.COM and CMD.EXE, single-
  12989.                     character FOR variables do not overwrite existing
  12990.                     environment variables with the same name.  As a
  12991.                     result, when using a multi-character variable name you
  12992.                     must be careful not to use the name of one of your
  12993.                     environment variables as a FOR variable.  For example,
  12994.                     a command that begins
  12995.  
  12996.                          c:\> for %path in ...
  12997.  
  12998.                     will write over your current path setting and then
  12999.                     erase the path variable completely.
  13000.  
  13001.                  ## FOR statements can be nested.  Under 4DOS, the
  13002.                     permissible nesting level depends on the amount of
  13003.                     free space in 4DOS's internal stack.
  13004.  
  13005.           4DOS ! ## If you receive a stack overflow error when using FOR
  13006.                     in complex, nested command sequences, see the notes
  13007.                     under the StackSize directive on page 143.
  13008.  
  13009.         Options: ## /A(ttribute select):  Process only those files that
  13010.                     have the specified attribute(s).  /A will be used only
  13011.                     when processing wildcard file names in the set.  It
  13012.                     will be ignored for filenames without wildcards or
  13013.                     other items in the set.  Preceding the attribute
  13014.                     character with a hyphen [-] will process files that do
  13015.                     not have that attribute set.  The attributes are:
  13016.  
  13017.                             R      Read-only         D    Subdirectory
  13018.                             H      Hidden            A    Archive
  13019.                             S      System
  13020.  
  13021.                     If no attributes are listed (e.g., FOR /A ...), FOR
  13022.                     will process all files including hidden and system
  13023.                     files.  If attributes are combined, all the specified
  13024.                     attributes must match for a file to be included.  For
  13025.                     example, /A:RHS will include only those files with all
  13026.  
  13027.         -------------------------------------------------------------------
  13028.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 226
  13029.  
  13030.                                                                         FOR
  13031.         -------------------------------------------------------------------
  13032.  
  13033.                     three attributes set.  See page 18 for more
  13034.                     information on file attributes.
  13035.  
  13036.                     For example, to process only those files with the
  13037.                     archive attribute set:
  13038.  
  13039.                          for /a:a %f in (*.*) echo %f needs a backup!
  13040.  
  13041.  
  13042.  
  13043.  
  13044.  
  13045.  
  13046.  
  13047.  
  13048.  
  13049.  
  13050.  
  13051.  
  13052.  
  13053.  
  13054.  
  13055.  
  13056.  
  13057.  
  13058.  
  13059.  
  13060.  
  13061.  
  13062.  
  13063.  
  13064.  
  13065.  
  13066.  
  13067.  
  13068.  
  13069.  
  13070.  
  13071.  
  13072.  
  13073.  
  13074.  
  13075.  
  13076.  
  13077.  
  13078.  
  13079.  
  13080.  
  13081.  
  13082.  
  13083.         -------------------------------------------------------------------
  13084.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 227
  13085.  
  13086.                                                                        FREE
  13087.         -------------------------------------------------------------------
  13088.  
  13089.         FREE                                                          (New)
  13090.  
  13091.         Purpose:    Display the total disk space, total bytes used, and
  13092.                     total bytes free on the specified (or default)
  13093.                     drive(s).
  13094.  
  13095.         Format:     FREE [drive: ...]
  13096.  
  13097.                     drive:       One or more drives to include in the
  13098.                                  report.
  13099.  
  13100.                     See also:  MEMORY.
  13101.  
  13102.         Usage:      FREE provides the same disk information as the
  13103.                     external command CHKDSK, but without the wait, since
  13104.                     it does not check the integrity of the file and
  13105.                     directory structure of the disk.
  13106.  
  13107.                     A colon [:] is required after each drive letter.  This
  13108.                     example displays the status of drives A and C:
  13109.  
  13110.                          c:\> free a: c:
  13111.                           Volume in drive A: is unlabeled
  13112.                            1,213,952 bytes total disk space
  13113.                            1,115,136 bytes used
  13114.                               98,816 bytes free
  13115.                           Volume in drive C: is DEVELOPMENT
  13116.                           42,496,000 bytes total disk space
  13117.                           36,851,712 bytes used
  13118.                            5,644,288 bytes free
  13119.  
  13120.                     If you are using DOS 4.0 or later, OS/2, or Windows
  13121.                     NT, the volume serial number will appear after the
  13122.                     drive label or name.
  13123.  
  13124.              4DOS   Some DOS networks with large server disk drives (256
  13125.                     MB or more) may report disk space values that are too
  13126.                     small when FREE is used.  If this occurs, it is
  13127.                     because the network software does not report the
  13128.                     proper values to 4DOS.
  13129.  
  13130.  
  13131.  
  13132.  
  13133.  
  13134.  
  13135.  
  13136.  
  13137.  
  13138.  
  13139.         -------------------------------------------------------------------
  13140.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 228
  13141.  
  13142.                                                                      GLOBAL
  13143.         -------------------------------------------------------------------
  13144.  
  13145.         GLOBAL                                                        (New)
  13146.  
  13147.         Purpose:    Execute a command in the current directory and its
  13148.                     subdirectories.
  13149.  
  13150.         Format:     GLOBAL [/H /I /P /Q] command
  13151.  
  13152.                     command:     The command to execute, including
  13153.                                  arguments and switches.
  13154.  
  13155.                     /H(idden directories)    /P(rompt)
  13156.                     /I(gnore exit codes)     /Q(uiet)
  13157.  
  13158.         Usage:      GLOBAL performs the command first in the current
  13159.                     directory and then in every subdirectory under the
  13160.                     current directory.  The command can be an internal
  13161.                     command, an alias, an external command, or a batch
  13162.                     file.
  13163.  
  13164.                     This example copies the files in every directory on
  13165.                     drive A to the directory C:\TEMP:
  13166.  
  13167.                          a:\> global copy *.* c:\temp
  13168.  
  13169.                     If you use the /P option, GLOBAL will prompt for each
  13170.                     subdirectory before performing the command.  You can
  13171.                     use this option if you want to perform the command in
  13172.                     most, but not all subdirectories of the current
  13173.                     directory.
  13174.  
  13175.                  ## You can use command grouping (see page 69) to execute
  13176.                     multiple commands in each subdirectory.  For example,
  13177.                     the following command copies each .TXT file in the
  13178.                     current directory and all of its subdirectories to
  13179.                     drive A.  It then changes the extension of each of the
  13180.                     copied files to .SAV:
  13181.  
  13182.                          c:\> global (copy *.txt a: ^ ren *.txt *.sav)
  13183.  
  13184.           4DOS ! ## If you use GLOBAL in complex, nested command
  13185.                     sequences, see the cautionary note on page 143.
  13186.  
  13187.         Options: ## /H(idden directories):  Forces GLOBAL to look for
  13188.                     hidden directories.  If you don't use this switch,
  13189.                     hidden directories are ignored.
  13190.  
  13191.                  ## /I(gnore exit codes):  If this option is not
  13192.                     specified, GLOBAL will terminate if the command
  13193.                     returns a non-zero exit code.  Use /I if you want
  13194.  
  13195.         -------------------------------------------------------------------
  13196.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 229
  13197.  
  13198.                                                                      GLOBAL
  13199.         -------------------------------------------------------------------
  13200.  
  13201.                     command to continue in additional subdirectories even
  13202.                     if it returns an error in a previous subdirectory.
  13203.                     Even if you use /I, GLOBAL will halt execution in
  13204.                     response to Ctrl-C or Ctrl-Break.
  13205.  
  13206.                     /P(rompt):  Forces GLOBAL to prompt with each
  13207.                     directory name before it performs the command.  Your
  13208.                     options at the prompt are explained in detail on page
  13209.                     48.
  13210.  
  13211.                     /Q(uiet):  Do not display the directory names as each
  13212.                     directory is processed.
  13213.  
  13214.  
  13215.  
  13216.  
  13217.  
  13218.  
  13219.  
  13220.  
  13221.  
  13222.  
  13223.  
  13224.  
  13225.  
  13226.  
  13227.  
  13228.  
  13229.  
  13230.  
  13231.  
  13232.  
  13233.  
  13234.  
  13235.  
  13236.  
  13237.  
  13238.  
  13239.  
  13240.  
  13241.  
  13242.  
  13243.  
  13244.  
  13245.  
  13246.  
  13247.  
  13248.  
  13249.  
  13250.  
  13251.         -------------------------------------------------------------------
  13252.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 230
  13253.  
  13254.                                                                       GOSUB
  13255.         -------------------------------------------------------------------
  13256.  
  13257.         GOSUB                                                         (New)
  13258.  
  13259.         Purpose:    Execute a subroutine in the current batch file.
  13260.  
  13261.         Format:     GOSUB label
  13262.  
  13263.                     label:       The batch file label at the beginning of
  13264.                                  the subroutine.
  13265.  
  13266.                     See also:  CALL, GOTO and RETURN.
  13267.  
  13268.         Usage:      GOSUB can only be used in batch files.
  13269.  
  13270.                     4DOS, 4OS2, and 4DOS/NT allow subroutines in batch
  13271.                     files.  A subroutine must start with a label (a colon
  13272.                     [:] followed by a one-word label name) which appears
  13273.                     on a line by itself.  Case differences are ignored
  13274.                     when matching labels.  The subroutine must end with a
  13275.                     RETURN statement.
  13276.  
  13277.                     The subroutine is invoked with a GOSUB command from
  13278.                     another part of the batch file.  After the RETURN,
  13279.                     processing will continue with the command following
  13280.                     the GOSUB command.  For example, the following batch
  13281.                     file fragment calls a subroutine which displays the
  13282.                     directory and returns:
  13283.  
  13284.                          echo Calling a subroutine
  13285.                          gosub subr1
  13286.                          echo Returned from the subroutine
  13287.                          quit
  13288.                          :subr1
  13289.                          dir /a/w
  13290.                          return
  13291.  
  13292.                     If the label doesn't exist, the batch file is
  13293.                     terminated with the error message "Label not found."
  13294.  
  13295.                     GOSUB saves the IFF state, so IFF statements inside a
  13296.                     subroutine won't interfere with IFF statements in the
  13297.                     part of the batch file from which the subroutine was
  13298.                     called.
  13299.  
  13300.                  ## Subroutines can be nested.  Under 4DOS, the
  13301.                     permissible nesting level depends on the amount of
  13302.                     free space in 4DOS's internal stack; if you receive a
  13303.                     stack overflow error when using GOSUB in complex,
  13304.                     nested command sequences, see the notes under the
  13305.                     StackSize directive on page 143.
  13306.  
  13307.         -------------------------------------------------------------------
  13308.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 231
  13309.  
  13310.                                                                        GOTO
  13311.         -------------------------------------------------------------------
  13312.  
  13313.         GOTO                                                   (Compatible)
  13314.  
  13315.         Purpose:    Branch to a specified line inside the current batch
  13316.                     file.
  13317.  
  13318.         Format:     GOTO [/I] label
  13319.  
  13320.                     label:       The batch file label to branch to.
  13321.  
  13322.                     /I(FF and DO continue)
  13323.  
  13324.                     See also:  GOSUB.
  13325.  
  13326.         Usage:      GOTO can only be used in batch files.
  13327.  
  13328.                     After a GOTO command in a batch file, the next line to
  13329.                     be executed will be the one immediately after the
  13330.                     label.  The label must begin with a colon [:] and
  13331.                     appear on a line by itself.  The colon is required on
  13332.                     the line where the label is defined, but is not
  13333.                     required in the GOTO command itself.  Case differences
  13334.                     are ignored when matching labels.
  13335.  
  13336.                     This batch file fragment checks for the existence of
  13337.                     the file CONFIG.SYS.  If the file exists, the batch
  13338.                     file jumps to C_EXISTS and copies all the files from
  13339.                     the current directory to the root directory on A:.
  13340.                     Otherwise, it prints an error message and exits.
  13341.  
  13342.                          if exist config.sys goto C_EXISTS
  13343.                          echo CONFIG.SYS doesn't exist - exiting.
  13344.                          quit
  13345.                          :C_EXISTS
  13346.                          copy *.* a:\
  13347.  
  13348.                     If the label doesn't exist, the batch file is
  13349.                     terminated with the error message "Label not found."
  13350.  
  13351.                ! ## To avoid errors in the processing of nested statements
  13352.                     and loops, GOTO cancels all active IFF statements and
  13353.                     DO /ENDDO loops unless you use /I.  This means that a
  13354.                     normal GOTO (without /I) may not branch to any label
  13355.                     that is between an IFF and the corresponding ENDIFF or
  13356.                     between a DO and the corresponding ENDDO.
  13357.  
  13358.         Options: ## /I(FF and DO continue):  Prevents GOTO from canceling
  13359.                     IFF statements and DO loops.  Use this option only if
  13360.                     you are absolutely certain that your GOTO command is
  13361.                     branching entirely within any current IFF statement
  13362.  
  13363.         -------------------------------------------------------------------
  13364.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 232
  13365.  
  13366.                                                                        GOTO
  13367.         -------------------------------------------------------------------
  13368.  
  13369.                     and any active DO / ENDDO block.  Using /I under any
  13370.                     other conditions will cause an error later in your
  13371.                     batch file.
  13372.  
  13373.                     You cannot branch into another IFF statement, another
  13374.                     DO loop, or a different IFF or DO nesting level,
  13375.                     whether you use the /I option or not.  If you do, you
  13376.                     will eventually receive an "unknown command" error (or
  13377.                     execution of the UNKNOWN_CMD alias) on a subsequent
  13378.                     ENDDO, ELSE, ELSEIFF, or ENDIFF statement.
  13379.  
  13380.  
  13381.  
  13382.  
  13383.  
  13384.  
  13385.  
  13386.  
  13387.  
  13388.  
  13389.  
  13390.  
  13391.  
  13392.  
  13393.  
  13394.  
  13395.  
  13396.  
  13397.  
  13398.  
  13399.  
  13400.  
  13401.  
  13402.  
  13403.  
  13404.  
  13405.  
  13406.  
  13407.  
  13408.  
  13409.  
  13410.  
  13411.  
  13412.  
  13413.  
  13414.  
  13415.  
  13416.  
  13417.  
  13418.  
  13419.         -------------------------------------------------------------------
  13420.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 233
  13421.  
  13422.                                                                        HELP
  13423.         -------------------------------------------------------------------
  13424.  
  13425.         HELP                                   (Enhanced, External command)
  13426.  
  13427.         Purpose:    Display help for internal commands.  Help for external
  13428.                     commands is also available under DOS, and optionally
  13429.                     under OS/2.
  13430.  
  13431.         Format:     HELP [topic]
  13432.  
  13433.                     topic:       A help topic, internal command, or
  13434.                                  external command.
  13435.  
  13436.         Usage:      Online help is available for 4DOS, 4OS2, and 4DOS/NT.
  13437.                     The 4OS2 and 4DOS/NT help systems use the operating
  13438.                     system's help facility.  4DOS uses its own help
  13439.                     program.
  13440.  
  13441.                     See page 46 for more details on getting help at the
  13442.                     command line.  See the Introduction and Installation
  13443.                     Guide that was supplied with your version of 4DOS,
  13444.                     4OS2, or 4DOS/NT for a more thorough explanation of
  13445.                     the online help available with the program you use.
  13446.  
  13447.                     If you type the command HELP by itself (or press F1
  13448.                     when the command line is empty), the table of contents
  13449.                     is displayed.  If you type HELP plus a topic name,
  13450.                     that topic is displayed.  For example,
  13451.  
  13452.                          help copy
  13453.  
  13454.                     displays information about the COPY command and its
  13455.                     options.
  13456.  
  13457.  
  13458.  
  13459.  
  13460.  
  13461.  
  13462.  
  13463.  
  13464.  
  13465.  
  13466.  
  13467.  
  13468.  
  13469.  
  13470.  
  13471.  
  13472.  
  13473.  
  13474.  
  13475.         -------------------------------------------------------------------
  13476.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 234
  13477.  
  13478.                                                                     HISTORY
  13479.         -------------------------------------------------------------------
  13480.  
  13481.         HISTORY                                                       (New)
  13482.  
  13483.         Purpose:    Display, add to, clear, or read the history list.
  13484.  
  13485.         Format:     HISTORY [/A command /F /P /R filename]
  13486.  
  13487.                     /A(dd)                   /P(ause)
  13488.                     /F(ree)                  /R(ead)
  13489.  
  13490.                     See also:  LOG.
  13491.  
  13492.         Usage:      4DOS, 4OS2, and 4DOS/NT keep a list of the commands
  13493.                     you have entered on the command line.  See page 35 for
  13494.                     information on command recall, which allows you to use
  13495.                     the history list to repeat or edit commands you have
  13496.                     typed.
  13497.  
  13498.                     The HISTORY command lets you view and manipulate the
  13499.                     command history list directly.  If no parameters are
  13500.                     entered, HISTORY will display the current command
  13501.                     history list:
  13502.  
  13503.                          c:\> history
  13504.  
  13505.                     With the options explained below, you can clear the
  13506.                     list, add new commands to the list without executing
  13507.                     them, save the list in a file, or read a new list from
  13508.                     a file.
  13509.  
  13510.                     The number of commands saved in the history list
  13511.                     depends on the length of each command line.  The
  13512.                     history list size can be specified at startup from 512
  13513.                     to 8192 characters (see page 127).  The default size
  13514.                     is 1024 characters.
  13515.  
  13516.                     Your history list can be stored either locally (a
  13517.                     separate history list for each copy of the command
  13518.                     processor) or globally (all copies of the command
  13519.                     processor share the same list).  For full details see
  13520.                     the discussion of local and global history lists
  13521.                     beginning on page 38.
  13522.  
  13523.                  ## You can use the HISTORY command as an aid in writing
  13524.                     batch files by redirecting the HISTORY output to a
  13525.                     file and then editing the file appropriately.
  13526.                     However, it is easier to use the LOG /H command for
  13527.                     this purpose.
  13528.  
  13529.  
  13530.  
  13531.         -------------------------------------------------------------------
  13532.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 235
  13533.  
  13534.                                                                     HISTORY
  13535.         -------------------------------------------------------------------
  13536.  
  13537.                  ## You can disable the history list or specify a minimum
  13538.                     command-line length to save with the HistMin directive
  13539.                     in the .INI file.
  13540.  
  13541.         Options: ## /A(dd):  Add a command to the history list.  This
  13542.                     performs the same function as the Ctrl-K key at the
  13543.                     command line (see page 35).
  13544.  
  13545.                     /F(ree):  Erase all entries in the command history
  13546.                     list.
  13547.  
  13548.                     /P(rompt):  Wait for a key after displaying each page
  13549.                     of the list.  Your options at the prompt are explained
  13550.                     in detail on page 48.
  13551.  
  13552.                  ## /R(ead):  Read the command history from the specified
  13553.                     file and append it to the history list currently held
  13554.                     in memory.  Each line in the file must fit within the
  13555.                     command-line length limit for your command processor
  13556.                     (see page 47).
  13557.  
  13558.                     You can save the history list by redirecting the
  13559.                     output of HISTORY to a file.  This example saves the
  13560.                     command history to a file called HISTFILE and reads it
  13561.                     back again immediately.  If you leave out the HISTORY
  13562.                     /F command on the second line, the contents of the
  13563.                     file will be appended to the current history list
  13564.                     instead of replacing it:
  13565.  
  13566.                          c:\> history > histfile
  13567.                          c:\> history /f
  13568.                          c:\> history /r histfile
  13569.  
  13570.                     If you need to save your history at the end of each
  13571.                     day's work, you might use commands like this in your
  13572.                     AUTOEXEC.BAT or other startup file:
  13573.  
  13574.                          if exist c:\histfile history /r c:\histfile
  13575.                          alias shut*down `history > c:\histfile`
  13576.  
  13577.                     This restores the previous history list if it exists,
  13578.                     then defines an alias which will save the history
  13579.                     before shutting off the system.
  13580.  
  13581.                  ## If you are creating a HISTORY /R file by hand, and
  13582.                     need to create an entry that spans multiple lines in
  13583.                     the file, you can do so by terminating each line,
  13584.                     except the last, with an escape character (see page
  13585.  
  13586.  
  13587.         -------------------------------------------------------------------
  13588.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 236
  13589.  
  13590.                                                                     HISTORY
  13591.         -------------------------------------------------------------------
  13592.  
  13593.                     71).  However, you cannot use this method to exceed
  13594.                     the command-line length limit.
  13595.  
  13596.  
  13597.  
  13598.  
  13599.  
  13600.  
  13601.  
  13602.  
  13603.  
  13604.  
  13605.  
  13606.  
  13607.  
  13608.  
  13609.  
  13610.  
  13611.  
  13612.  
  13613.  
  13614.  
  13615.  
  13616.  
  13617.  
  13618.  
  13619.  
  13620.  
  13621.  
  13622.  
  13623.  
  13624.  
  13625.  
  13626.  
  13627.  
  13628.  
  13629.  
  13630.  
  13631.  
  13632.  
  13633.  
  13634.  
  13635.  
  13636.  
  13637.  
  13638.  
  13639.  
  13640.  
  13641.  
  13642.  
  13643.         -------------------------------------------------------------------
  13644.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 237
  13645.  
  13646.                                                                          IF
  13647.         -------------------------------------------------------------------
  13648.  
  13649.         IF                                                       (Enhanced)
  13650.  
  13651.         Purpose:    Execute a command if a condition or set of conditions
  13652.                     is true.
  13653.  
  13654.         Format:     IF [NOT] condition [.AND. | .OR. | .XOR. [NOT]
  13655.                          condition ...] command
  13656.  
  13657.                     condition:   A test to determine if the command should
  13658.                                  be executed.
  13659.                     command:     The command to execute if the condition is
  13660.                                  true.
  13661.  
  13662.                     See also:  IFF.
  13663.  
  13664.         Usage:      IF is normally used only in aliases and batch files.
  13665.                     It is always followed by one or more conditions and
  13666.                     then a command.  First, the conditions are evaluated.
  13667.                     If they are true, the command is executed.  Otherwise,
  13668.                     the command is ignored.  If you add a NOT before a
  13669.                     condition, the command is executed only when the
  13670.                     condition is false.
  13671.  
  13672.                     You can link conditions with .AND., .OR., or .XOR.,
  13673.                     and you can nest IF statements.  The conditions can
  13674.                     test strings, numbers, the existence of a file or
  13675.                     subdirectory, the exit code returned by the preceding
  13676.                     external command, and the existence of alias names and
  13677.                     internal commands.
  13678.  
  13679.                     The command can be an alias, an internal command, an
  13680.                     external command, or a batch file.  The entire IF
  13681.                     statement, including all conditions and the command,
  13682.                     must fit on one line.
  13683.  
  13684.                  ## You can use command grouping (see page 69) to execute
  13685.                     multiple commands if the condition is true.  For
  13686.                     example, the following command tests if any .TXT files
  13687.                     exist.  If they do, they are copied to drive A: and
  13688.                     their extensions are changed to .TXO:
  13689.  
  13690.                          if exist *.txt (copy *.txt a: ^ ren *.txt *.txo)
  13691.  
  13692.                     (Change the command separator to an ampersand [&] to
  13693.                     use a command like this under 4OS2 or 4DOS/NT.  Also,
  13694.                     note that the IFF command provides a more structured
  13695.                     method of executing multiple commands if a condition
  13696.                     or set of conditions is true.)
  13697.  
  13698.  
  13699.         -------------------------------------------------------------------
  13700.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 238
  13701.  
  13702.                                                                          IF
  13703.         -------------------------------------------------------------------
  13704.  
  13705.           4DOS ! ## If you receive a stack overflow error when using IF in
  13706.                     complex, nested command sequences, see the notes under
  13707.                     the StackSize directive on page 143.
  13708.  
  13709.         Conditions: The following conditional tests are available in both
  13710.                     the IF and IFF commands.  They fit into two
  13711.                     categories:  string and numeric tests, and status
  13712.                     tests.  The tests can use environment variables,
  13713.                     internal variables and variable functions, file names,
  13714.                     literal text, and numeric values as their arguments.
  13715.  
  13716.                     Spaces are required on either side of the test
  13717.                     condition in all cases, except == which will work with
  13718.                     or without spaces around it.
  13719.  
  13720.  
  13721.                     String and Numeric Tests
  13722.  
  13723.                     Six test conditions can be used to test character
  13724.                     strings.  The same conditions are available for both
  13725.                     numeric and normal text strings (see below for
  13726.                     details).  In each case you enter the test as:
  13727.  
  13728.                          string1 operator string2
  13729.  
  13730.                     The operator defines the type of test (equal, greater
  13731.                     than or equal, and so on).  The operators are:
  13732.  
  13733.                          Operator     Tests
  13734.  
  13735.                          EQ or ==     string1 equal to string2
  13736.                          NE or !=     string1 not equal to string2
  13737.                          LT           string1 less than string2
  13738.                          LE           string1 less than or equal to string2
  13739.                          GE           string1 greater than or equal to
  13740.                                       string2
  13741.                          GT           string1 greater than string2
  13742.  
  13743.                     When IF compares two character strings, it will use
  13744.                     either a numeric comparison or a string comparison.  A
  13745.                     numeric comparison treats the strings as numeric
  13746.                     values and tests them arithmetically.  A string
  13747.                     comparison treats the strings as text.
  13748.  
  13749.                     The difference between numeric and string comparisons
  13750.                     is best explained by looking at the way two values are
  13751.                     tested.  For example, consider comparing the values 2
  13752.                     and 19.  Numerically, 2 is smaller, but as a string it
  13753.                     is "larger" because its first digit is larger than the
  13754.  
  13755.         -------------------------------------------------------------------
  13756.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 239
  13757.  
  13758.                                                                          IF
  13759.         -------------------------------------------------------------------
  13760.  
  13761.                     first digit of 19.  So the first of these conditions
  13762.                     will be true, and the second will be false:
  13763.  
  13764.                          if 2 lt 19 ...
  13765.                          if "2" lt "19" ...
  13766.  
  13767.                     IF determines which kind of test to do by examining
  13768.                     the first character of each string.  If both strings
  13769.                     begin with a numeric character (a digit, sign, or
  13770.                     decimal point), a numeric comparison is used.  If
  13771.                     either value does not begin with a numeric character,
  13772.                     a string comparison is used.  To force a string
  13773.                     comparison when both values are or may be numeric, use
  13774.                     double quotes around the values you are testing, as
  13775.                     shown above.  Because the double quote is not a
  13776.                     numeric character, it forces IF to do a string
  13777.                     comparison.
  13778.  
  13779.                     Case differences are ignored in string comparisons.
  13780.                     If two strings begin with the same text but one is
  13781.                     shorter, the shorter string is considered to be "less
  13782.                     than" the longer one.  For example, "a" is less than
  13783.                     "abc", and "hello_there" is greater than "hello".
  13784.  
  13785.                     When you compare text strings, you should always
  13786.                     enclose the arguments in double quotes in order to
  13787.                     avoid syntax errors which may occur if one of the
  13788.                     argument values is empty.
  13789.  
  13790.                     Numeric comparisons work with both integer and decimal
  13791.                     values.  The values to be compared must contain only
  13792.                     numeric digits, decimal points, and an optional sign
  13793.                     (+ or -).  The number to the left of the decimal point
  13794.                     may not exceed 2,147,483,648 (the maximum possible 32-
  13795.                     bit positive integer).  The number of digits to the
  13796.                     right of the decimal point is limited only by the
  13797.                     length of the command line.
  13798.  
  13799.                     Internal variables (page 97) and variable functions
  13800.                     (page 105) are very powerful when combined with string
  13801.                     and numeric comparisons.  They allow you to test the
  13802.                     state of your system, the characteristics of a file,
  13803.                     date and time information, or the result of a
  13804.                     calculation.  You may want to review the variables and
  13805.                     variable functions when determining the best way to
  13806.                     set up an IF test.
  13807.  
  13808.                     This first example is a batch file fragment which runs
  13809.                     a program called MONOPROG if a monochrome monitor is
  13810.  
  13811.         -------------------------------------------------------------------
  13812.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 240
  13813.  
  13814.                                                                          IF
  13815.         -------------------------------------------------------------------
  13816.  
  13817.                     attached to the system (this example will work in 4DOS
  13818.                     or 4OS2; 4DOS/NT does not include the _MONITOR
  13819.                     variable):
  13820.  
  13821.                          if "%_monitor" == "mono" monoprog
  13822.  
  13823.                     The second batch file fragment tests for a string
  13824.                     value:
  13825.  
  13826.                          input "Enter your selection : " %%cmd
  13827.                          if "%cmd" == "WP" goto wordproc
  13828.                          if "%cmd" NE "GRAPHICS" goto badentry
  13829.  
  13830.                     This example calls GO.BTM if the first two characters
  13831.                     in the file MYFILE are "GO" (enter this example on one
  13832.                     line):
  13833.  
  13834.                          if "%@instr[0,2,%@line[myfile,0]]"=="GO"
  13835.                          call go.btm
  13836.  
  13837.                     The next two examples test whether there is more than
  13838.                     500 KBytes of free memory or more than 2 MBytes of
  13839.                     free EMS memory (the EMS example only applies to
  13840.                     4DOS):
  13841.  
  13842.                          c:\> if %@dosmem[k] gt 500 echo Over 500K free
  13843.                          c:\> if %@ems[m] gt 2 echo Over 2 MB EMS free
  13844.  
  13845.  
  13846.                     Status Tests
  13847.  
  13848.                     These conditions test the system or command processor
  13849.                     status.  You can use internal variables and variable
  13850.                     functions to test many other parts of the system
  13851.                     status.
  13852.  
  13853.                        ERRORLEVEL [operator] n
  13854.  
  13855.                          This test retrieves the exit code of the
  13856.                          preceding external program.  By convention,
  13857.                          programs return an exit code of 0 when they are
  13858.                          successful and a number between 1 and 255 to
  13859.                          indicate an error.  The condition can be any of
  13860.                          the operators listed above (EQ, !=, GT, etc.).
  13861.                          If no operator is specified, the default is GE.
  13862.                          The comparison is done numerically.
  13863.  
  13864.  
  13865.  
  13866.  
  13867.         -------------------------------------------------------------------
  13868.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 241
  13869.  
  13870.                                                                          IF
  13871.         -------------------------------------------------------------------
  13872.  
  13873.                          Not all programs return an explicit exit code.
  13874.                          For programs which do not, the behavior of
  13875.                          ERRORLEVEL is undefined.
  13876.  
  13877.                        EXIST filename
  13878.  
  13879.                          If the file exists, the condition is true.  You
  13880.                          can use wildcards in the filename, in which case
  13881.                          the condition is true if any file matching the
  13882.                          wildcard name exists.
  13883.  
  13884.                        ISALIAS aliasname
  13885.  
  13886.                          If the name is defined as an alias, the condition
  13887.                          is true.
  13888.  
  13889.                        ISDIR | DIREXIST path
  13890.  
  13891.                          If the subdirectory exists, the condition is
  13892.                          true.  For compatibility with DR DOS and Novell
  13893.                          DOS, DIREXIST may be used as a synonym for ISDIR.
  13894.  
  13895.                        ISINTERNAL command
  13896.  
  13897.                          If the specified command is an active internal
  13898.                          command, the condition is true.  Commands can be
  13899.                          activated and deactivated with the SETDOS /I
  13900.                          command.
  13901.  
  13902.                        ISLABEL labelname
  13903.  
  13904.                          If the name exists as a label in the current
  13905.                          batch file, the condition is true.
  13906.  
  13907.              4NT       ISWINDOW "title"
  13908.  
  13909.                          If a window with the title exists, the condition
  13910.                          is true.  Double quotes must be used around the
  13911.                          title.
  13912.  
  13913.                     The first batch file fragment below tests for the
  13914.                     existence of A:\JAN.DOC before copying it to drive C.
  13915.  
  13916.                          if exist a:\jan.doc copy a:\jan.doc c:\
  13917.  
  13918.                     This example tests the exit code of the previous
  13919.                     program and stops all batch file processing if an
  13920.                     error occurred:
  13921.  
  13922.  
  13923.         -------------------------------------------------------------------
  13924.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 242
  13925.  
  13926.                                                                          IF
  13927.         -------------------------------------------------------------------
  13928.  
  13929.                          if errorlevel==0 goto success
  13930.                          echo "External Error -- Batch File Ends!"
  13931.                          cancel
  13932.  
  13933.  
  13934.                  ## Combining Tests
  13935.  
  13936.                     You can negate the result of any test with NOT, and
  13937.                     combine tests of any type with .AND., .OR., and .XOR.
  13938.                     Test conditions are always scanned from left to right
  13939.                     - there is no implied order of precedence, as there is
  13940.                     in some programming languages.
  13941.  
  13942.                     When two tests are combined with .AND., the result is
  13943.                     true if both individual tests are true.  When two
  13944.                     tests are combined with .OR., the result is true if
  13945.                     either (or both) individual tests are true.  When two
  13946.                     tests are combined with .XOR., the result is true only
  13947.                     if one of the tests is true and the other is false.
  13948.  
  13949.                     This example runs a program called HIGHRES if either
  13950.                     an EGA or VGA video adapter is in use (this will work
  13951.                     in 4DOS or 4OS2; 4DOS/NT does not include the _VIDEO
  13952.                     variable):
  13953.  
  13954.                          if "%_video"=="ega" .or. "%_video"=="vga" highres
  13955.  
  13956.  
  13957.  
  13958.  
  13959.  
  13960.  
  13961.  
  13962.  
  13963.  
  13964.  
  13965.  
  13966.  
  13967.  
  13968.  
  13969.  
  13970.  
  13971.  
  13972.  
  13973.  
  13974.  
  13975.  
  13976.  
  13977.  
  13978.  
  13979.         -------------------------------------------------------------------
  13980.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 243
  13981.  
  13982.                                                                         IFF
  13983.         -------------------------------------------------------------------
  13984.  
  13985.         IFF                                                           (New)
  13986.  
  13987.         Purpose:    Perform IF / THEN / ELSE conditional execution of
  13988.                     commands.
  13989.  
  13990.         Format:     IFF [NOT] condition [.AND. | .OR. | .XOR. [NOT]
  13991.                        condition ...] THEN ^ commands
  13992.                     [ELSEIFF condition  THEN ^ commands] ...
  13993.                     [ELSE ^ commands]
  13994.                     ^ ENDIFF
  13995.  
  13996.                     condition:   A test to determine if the command(s)
  13997.                                  should be executed.
  13998.                     commands:    One or more commands to execute if the
  13999.                                  condition(s) is true.  If you use multiple
  14000.                                  commands, they must be separated by
  14001.                                  command separators or be placed on
  14002.                                  separate lines of a batch file.
  14003.  
  14004.                     See also:  IF.
  14005.  
  14006.         Usage:      IFF is similar to the IF command, except that it can
  14007.                     perform one set of commands when a condition or set of
  14008.                     conditions is true and different commands when the
  14009.                     conditions are false.
  14010.  
  14011.                     IFF can execute multiple commands when the conditions
  14012.                     are true or false; IF normally executes only one
  14013.                     command.  IFF imposes no limit on the number of
  14014.                     commands and is generally a "cleaner" and more
  14015.                     structured command than IF.
  14016.  
  14017.                     IFF is always followed by one or more conditions.  If
  14018.                     they are true, the commands that follow the word THEN
  14019.                     are executed.  Additional conditions can be tested
  14020.                     with ELSEIFF.  If none of these conditions are true,
  14021.                     the commands that follow the word ELSE are executed.
  14022.                     In both cases, after the selected commands are
  14023.                     executed, processing continues after the word ENDIFF.
  14024.  
  14025.                     If you add a NOT before the condition, the THEN
  14026.                     commands are executed only when the condition is false
  14027.                     and the ELSE commands are executed only when the
  14028.                     condition is true.
  14029.  
  14030.                     The commands may be separated by command separators,
  14031.                     or may be on separate lines of a batch file.  You
  14032.                     should include a command separator or a line break
  14033.                     after a THEN, before an ELSEIFF, and before and after
  14034.  
  14035.         -------------------------------------------------------------------
  14036.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 244
  14037.  
  14038.                                                                         IFF
  14039.         -------------------------------------------------------------------
  14040.  
  14041.                     an ELSE.  Note that the syntax above and the examples
  14042.                     below use the default 4DOS command separator, a caret
  14043.                     [^].  Replace the caret with an ampersand [&] if you
  14044.                     are using 4OS2 or 4DOS/NT.
  14045.  
  14046.                     You can link conditions with .AND., .OR., or .XOR.,
  14047.                     and you can nest IFF statements up to 15 levels deep.
  14048.                     The conditions can test strings or numbers, the
  14049.                     existence of a file or subdirectory, the errorlevel
  14050.                     returned from the preceding external command, and the
  14051.                     existence of alias names and internal commands.
  14052.  
  14053.                     See the IF command for a list of the possible
  14054.                     conditions.
  14055.  
  14056.                     The commands can include any internal command, alias,
  14057.                     external command, or batch file.
  14058.  
  14059.                     The following batch file fragment for 4DOS or 4OS2
  14060.                     tests the monitor type (monochrome or color), and sets
  14061.                     the appropriate colors and prompt (enter the "prompt"
  14062.                     lines on one line of the batch file):
  14063.  
  14064.                          iff "%_monitor" == "color" then
  14065.                            color bright white on blue ^ cls
  14066.                            prompt=$e[s$e[1;1f$e[41;1;37m$e[K  Path:
  14067.                               $p$e[u$e[44;37m$n$g
  14068.                          else
  14069.                            prompt=$e[s$e[1;1f$e[0;7m$e[K  Path:
  14070.                               $p$e[u$e[0m$n$g
  14071.                          endiff
  14072.  
  14073.                     (The above example uses ANSI color sequences in the
  14074.                     prompt, which work in 4DOS if an ANSI driver is
  14075.                     loaded, and in 4OS2.  They will not work in 4DOS/NT,
  14076.                     because Windows NT does not offer ANSI support.  See
  14077.                     PROMPT for additional details.)
  14078.  
  14079.                     The alias in this second example checks to see if the
  14080.                     argument is a subdirectory.  If so, the alias deletes
  14081.                     the subdirectory's files and removes it (enter this on
  14082.                     one line):
  14083.  
  14084.                          c:\> alias prune `iff isdir %1 then ^
  14085.                               del /sxz %1 ^ else ^
  14086.                               echo Not a directory!^endiff`
  14087.  
  14088.  
  14089.  
  14090.  
  14091.         -------------------------------------------------------------------
  14092.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 245
  14093.  
  14094.                                                                         IFF
  14095.         -------------------------------------------------------------------
  14096.  
  14097.                ! ## Be sure to read the cautionary notes about GOTO and
  14098.                     IFF under the GOTO command (page 232) before using a
  14099.                     GOTO inside an IFF statement.
  14100.  
  14101.  
  14102.  
  14103.  
  14104.  
  14105.  
  14106.  
  14107.  
  14108.  
  14109.  
  14110.  
  14111.  
  14112.  
  14113.  
  14114.  
  14115.  
  14116.  
  14117.  
  14118.  
  14119.  
  14120.  
  14121.  
  14122.  
  14123.  
  14124.  
  14125.  
  14126.  
  14127.  
  14128.  
  14129.  
  14130.  
  14131.  
  14132.  
  14133.  
  14134.  
  14135.  
  14136.  
  14137.  
  14138.  
  14139.  
  14140.  
  14141.  
  14142.  
  14143.  
  14144.  
  14145.  
  14146.  
  14147.         -------------------------------------------------------------------
  14148.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 246
  14149.  
  14150.                                                                       INKEY
  14151.         -------------------------------------------------------------------
  14152.  
  14153.         INKEY                                                         (New)
  14154.  
  14155.         Purpose:    Get a single keystroke from the user and store it in
  14156.                     an environment variable.
  14157.  
  14158.         Format:     INKEY [/C /K"keys" /P /Wn] [prompt] %%varname
  14159.  
  14160.                     prompt:      Optional text that is displayed as a
  14161.                                  prompt.
  14162.                     varname:     The variable that will hold the user's
  14163.                                  keystroke.
  14164.  
  14165.                     /C(lear buffer)          /P(assword)
  14166.                     /K (valid keystrokes)    /W(ait)
  14167.  
  14168.                     See also:  INPUT and KEYSTACK.
  14169.  
  14170.         Usage:      INKEY optionally displays a prompt.  Then it waits for
  14171.                     a specified time or indefinitely for a keystroke, and
  14172.                     places the keystroke into an environment variable.  It
  14173.                     is normally used in batch files and aliases to get a
  14174.                     menu choice or other single-key input.  Along with the
  14175.                     INPUT command, INKEY allows great flexibility in
  14176.                     reading input from within a batch file or alias.
  14177.  
  14178.                     If prompt text is included in an INKEY command, it is
  14179.                     displayed while INKEY waits for input.
  14180.  
  14181.                     The following batch file fragment prompts for a
  14182.                     character and stores it in the variable NUM:
  14183.  
  14184.                          inkey Enter a number from 1 to 9:  %%num
  14185.  
  14186.                     INKEY reads standard input for the keystroke, so it
  14187.                     will accept keystrokes from a redirected file or from
  14188.                     the Keystack under 4DOS.  You can supply a list of
  14189.                     valid keystrokes with the /K option.
  14190.  
  14191.                     Standard keystrokes with ASCII values between 1 and
  14192.                     255 are stored directly in the environment variable.
  14193.                     Extended keystrokes (for example, function keys and
  14194.                     cursor keys) are stored as a string in decimal format,
  14195.                     with a leading @ (for example, the F1 key is @59).
  14196.                     The Enter key is stored as an extended keystroke, with
  14197.                     the code @28.  See Appendix B (page 357) for a list of
  14198.                     the ASCII and extended key codes.
  14199.  
  14200.                     If you press Ctrl-C or Ctrl-Break while INKEY is
  14201.                     waiting for a key, execution of an alias will be
  14202.  
  14203.         -------------------------------------------------------------------
  14204.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 247
  14205.  
  14206.                                                                       INKEY
  14207.         -------------------------------------------------------------------
  14208.  
  14209.                     terminated, and execution of a batch file will be
  14210.                     suspended while you are asked whether to cancel the
  14211.                     batch job (see page 82).  In a batch file you can
  14212.                     handle Ctrl-C and Ctrl-Break yourself with the ON
  14213.                     BREAK command (see page 274).
  14214.  
  14215.         Options:    /C(lear buffer):  Clears the keyboard buffer before
  14216.                     INKEY accepts keystrokes.  If you use this option,
  14217.                     INKEY will ignore any keystrokes which you type,
  14218.                     either accidentally or intentionally, before INKEY is
  14219.                     ready to accept input.
  14220.  
  14221.                     /K["keys"]:  Specify the permissible keystrokes.  The
  14222.                     list of valid keystrokes should be enclosed in double
  14223.                     quotes.  For alphabetic keys the validity test is not
  14224.                     case-sensitive.  You can specify extended keys by
  14225.                     enclosing their names in square brackets (within the
  14226.                     quotes), for example:
  14227.  
  14228.                          inkey /k"ab[F10]" Enter A, B, or F10 %%var
  14229.  
  14230.                     See page 31 for a complete listing of the key names
  14231.                     you can use within the square brackets, and a
  14232.                     description of the key name format.
  14233.  
  14234.                     If an invalid keystroke is entered, the command
  14235.                     processor will echo the keystroke if possible, beep,
  14236.                     move the cursor back one character, and wait for
  14237.                     another keystroke.
  14238.  
  14239.                     /P(assword):  Prevents INKEY from echoing the
  14240.                     character.
  14241.  
  14242.                     /W(ait):  Timeout period, in seconds, to wait for a
  14243.                     response.  If no keystroke is entered by the end of
  14244.                     the timeout period, INKEY returns with the variable
  14245.                     unchanged.  You can specify /W0 to return immediately
  14246.                     if there are no keys waiting in the keyboard buffer.
  14247.  
  14248.                     For example, the following batch file fragment waits
  14249.                     up to 10 seconds for a character, then tests to see if
  14250.                     a "Y" was entered:
  14251.  
  14252.                          set net=N
  14253.                          inkey /K"YN" /w10 Load the network (Y/N)?  %%net
  14254.                          iff "%net" == "Y" then
  14255.                            rem Commands to load the network go here
  14256.                          endiff
  14257.  
  14258.  
  14259.         -------------------------------------------------------------------
  14260.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 248
  14261.  
  14262.                                                                       INPUT
  14263.         -------------------------------------------------------------------
  14264.  
  14265.         INPUT                                                         (New)
  14266.  
  14267.         Purpose:    Get a string from the keyboard and save it in an
  14268.                     environment variable.
  14269.  
  14270.         Format:     INPUT [/C /E /Ln /P /Wn] [prompt] %%varname
  14271.  
  14272.                     prompt:      Optional text that is displayed as a
  14273.                                  prompt.
  14274.                     varname:     The variable that will hold the user's
  14275.                                  input.
  14276.  
  14277.                     /C(lear buffer)          /P(assword)
  14278.                     /E(dit)                  /W(ait)
  14279.                     /L(ength)
  14280.  
  14281.                     See also:  INKEY and KEYSTACK.
  14282.  
  14283.         Usage:      INPUT optionally displays a prompt.  Then it waits for
  14284.                     a specified time or indefinitely for your entry.  It
  14285.                     places any characters you type into an environment
  14286.                     variable.  INPUT is normally used in batch files and
  14287.                     aliases to get multi-key input.  Along with the INKEY
  14288.                     command, INPUT allows great flexibility in reading
  14289.                     user input from within a batch file or alias.
  14290.  
  14291.                     If prompt text is included in an INPUT command, it is
  14292.                     displayed while INPUT waits for input.  Standard
  14293.                     command-line editing keys may be used to edit the
  14294.                     input string as it is entered.  If you use the /P
  14295.                     password option, INPUT will echo asterisks instead of
  14296.                     the keys you type.
  14297.  
  14298.                     All characters entered up to, but not including, the
  14299.                     carriage return are stored in the variable.
  14300.  
  14301.                     The following batch file fragment prompts for a string
  14302.                     and stores it in the variable FNAME:
  14303.  
  14304.                          input Enter the file name:  %%fname
  14305.  
  14306.                     INPUT reads standard input, so it will accept text
  14307.                     from a re-directed file or from the KEYSTACK.
  14308.  
  14309.                     If you press Ctrl-C or Ctrl-Break while INPUT is
  14310.                     waiting for input, execution of an alias will be
  14311.                     terminated, and execution of a batch file will be
  14312.                     suspended while you are asked whether to cancel the
  14313.                     batch job (see page 82).  In a batch file you can
  14314.  
  14315.         -------------------------------------------------------------------
  14316.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 249
  14317.  
  14318.                                                                       INPUT
  14319.         -------------------------------------------------------------------
  14320.  
  14321.                     handle Ctrl-C and Ctrl-Break yourself with the ON
  14322.                     BREAK command (see page 274).
  14323.  
  14324.         Option:     /C(lear buffer):  Clears the keyboard buffer before
  14325.                     INPUT accepts keystrokes.  If you use this option,
  14326.                     INPUT will ignore any keystrokes which you type,
  14327.                     either accidentally or intentionally, before INPUT is
  14328.                     ready.
  14329.  
  14330.                     /E(dit):  Allows you to edit an existing value.  If
  14331.                     there is no existing value for varname, INPUT proceeds
  14332.                     as if /E had not been used, and allows you to enter a
  14333.                     new value.
  14334.  
  14335.                     /Ln (Length):  Sets the maximum number of characters
  14336.                     which INPUT will accept to "n".  If you attempt to
  14337.                     enter more than this number of characters, INPUT will
  14338.                     beep and prevent further input (you will still be able
  14339.                     to edit the characters typed before the limit was
  14340.                     reached).
  14341.  
  14342.                     /P(assword):  Tells INPUT to echo asterisks, instead
  14343.                     of the characters you type.
  14344.  
  14345.                     /W(ait):  Timeout period, in seconds, to wait for a
  14346.                     response.  If no keystroke is entered by the end of
  14347.                     the timeout period, INPUT returns with the variable
  14348.                     unchanged.  If you enter a key before the timeout
  14349.                     period, INPUT will wait indefinitely for the remainder
  14350.                     of the line.  You can specify /W0 to return
  14351.                     immediately if there are no keys waiting in the
  14352.                     keyboard buffer.
  14353.  
  14354.  
  14355.  
  14356.  
  14357.  
  14358.  
  14359.  
  14360.  
  14361.  
  14362.  
  14363.  
  14364.  
  14365.  
  14366.  
  14367.  
  14368.  
  14369.  
  14370.  
  14371.         -------------------------------------------------------------------
  14372.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 250
  14373.  
  14374.                                                                       KEYBD
  14375.         -------------------------------------------------------------------
  14376.  
  14377.         KEYBD                                                         (New)
  14378.  
  14379.         Purpose:    Set the state of the keyboard toggles:  Caps Lock, Num
  14380.                     Lock, and Scroll Lock.
  14381.  
  14382.         Format:     KEYBD [/Cn /Nn /Sn]
  14383.  
  14384.                     /C(aps lock)             /S(croll lock)
  14385.                     /N(um lock)
  14386.  
  14387.                     n can be either 0 to turn off the toggle or 1 to turn
  14388.                     on the toggle.
  14389.  
  14390.         Usage:      Most keyboards have 3 toggle keys, the Caps Lock, Num
  14391.                     Lock, and Scroll Lock.  The toggle key status is
  14392.                     usually displayed by three lights at the top right
  14393.                     corner of the keyboard.
  14394.  
  14395.                     This command lets you turn any toggle key on or off.
  14396.                     It is most useful in batch files and aliases if you
  14397.                     want the keys set a particular way before collecting
  14398.                     input from the user.
  14399.  
  14400.                     For example, to turn off the Num Lock and Caps Lock
  14401.                     keys, you can use this command:
  14402.  
  14403.                          c:\> keybd /c0 /n0
  14404.  
  14405.                     If you use the KEYBD command with no switches, it will
  14406.                     display the present state of the toggle keys.
  14407.  
  14408.              4DOS## In 4DOS, KEYBD works by performing a BIOS setting.
  14409.                     Some memory resident programs that monitor the
  14410.                     physical keyboard rather than BIOS settings may not
  14411.                     recognize that the state of the toggle keys has
  14412.                     changed after a KEYBD command.
  14413.  
  14414.              4OS2## In OS/2, the toggle key state is different for each
  14415.                     session.  Changes made with KEYBD will affect the
  14416.                     session in which the command is executed, but will not
  14417.                     affect other sessions.
  14418.  
  14419.              4NT ## In Windows NT, the toggle key state is the same for
  14420.                     all sessions.  Changes made in one session will affect
  14421.                     all other sessions.
  14422.  
  14423.         Options:    /C(aps lock):  Turn the Caps Lock key on or off.
  14424.  
  14425.                     /N(um lock):  Turn the Num Lock key on or off.
  14426.  
  14427.         -------------------------------------------------------------------
  14428.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 251
  14429.  
  14430.                                                                       KEYBD
  14431.         -------------------------------------------------------------------
  14432.  
  14433.                     /S(croll lock):  Turn the Scroll Lock key on or off.
  14434.  
  14435.  
  14436.  
  14437.  
  14438.  
  14439.  
  14440.  
  14441.  
  14442.  
  14443.  
  14444.  
  14445.  
  14446.  
  14447.  
  14448.  
  14449.  
  14450.  
  14451.  
  14452.  
  14453.  
  14454.  
  14455.  
  14456.  
  14457.  
  14458.  
  14459.  
  14460.  
  14461.  
  14462.  
  14463.  
  14464.  
  14465.  
  14466.  
  14467.  
  14468.  
  14469.  
  14470.  
  14471.  
  14472.  
  14473.  
  14474.  
  14475.  
  14476.  
  14477.  
  14478.  
  14479.  
  14480.  
  14481.  
  14482.  
  14483.         -------------------------------------------------------------------
  14484.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 252
  14485.  
  14486.                                                    [4OS2, 4DOS/NT]     KEYS
  14487.         -------------------------------------------------------------------
  14488.  
  14489.         KEYS         [4OS2, 4DOS/NT]                             (Enhanced)
  14490.  
  14491.         Purpose:    Enable, disable, or display the history list.
  14492.  
  14493.         Format:     KEYS [ON | OFF | LIST]
  14494.  
  14495.                     See also:  HISTORY.
  14496.  
  14497.         Usage:      This command is provided for compatibility with KEYS
  14498.                     command in CMD.EXE, which controls the history list in
  14499.                     OS/2 and Windows NT.  The same functions are available
  14500.                     by setting the HistMin directive in the .INI file, and
  14501.                     by using the HISTORY command.
  14502.  
  14503.                     The history list collects the commands you type for
  14504.                     later recall, editing, and viewing.  You can view the
  14505.                     contents of the list through the history list window
  14506.                     or by typing any of the following commands:
  14507.  
  14508.                          [c:\] history
  14509.                          [c:\] history /p
  14510.                          [c:\] keys list
  14511.  
  14512.                     The first command displays the entire history list.
  14513.                     The second displays the entire list and pauses at the
  14514.                     end of each full screen.  The third command produces
  14515.                     the same output as the first, except that each line is
  14516.                     numbered.
  14517.  
  14518.                     You can disable the collection and storage of commands
  14519.                     in the history list by typing:
  14520.  
  14521.                          [c:\] keys off
  14522.  
  14523.                     You can turn the history back on with the command:
  14524.  
  14525.                          [c:\] keys on
  14526.  
  14527.                     If you issue the KEYS command without any parameters,
  14528.                     4OS2 or 4DOS/NT will show you the current status of
  14529.                     the history list.
  14530.  
  14531.              4OS2   KEYS also affects the way 4OS2 reads input from the
  14532.                     keyboard.  KEYS OFF will force 4OS2 into line input
  14533.                     mode; KEYS ON will return input to the usual character
  14534.                     by character method.  See the LineInput directive on
  14535.                     page 133, or the /L option of the SETDOS command on
  14536.                     page 310, for details on line input mode.
  14537.  
  14538.  
  14539.         -------------------------------------------------------------------
  14540.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 253
  14541.  
  14542.                                                         [4DOS]     KEYSTACK
  14543.         -------------------------------------------------------------------
  14544.  
  14545.         KEYSTACK     [4DOS]                                           (New)
  14546.  
  14547.         Purpose:    Feed keystrokes to a program or command automatically.
  14548.  
  14549.         Format:     KEYSTACK [/Wn] ["abc"] [keyname] [!] ...
  14550.  
  14551.                     "abc":       Literal characters to be placed in the
  14552.                                  Keystack.
  14553.                     keyname:     Name or code for a key to be placed in the
  14554.                                  Keystack.
  14555.                     !:           Signal to clear the Keystack and the
  14556.                                  keyboard buffer.
  14557.  
  14558.                     /W(ait)
  14559.  
  14560.         Usage:      KEYSTACK takes a series of keystrokes and feeds them
  14561.                     to a program or command as if they were typed at the
  14562.                     keyboard.  When the program has used all of the
  14563.                     keystrokes in the keystack buffer, it will begin to
  14564.                     read the keyboard for input, as it normally would.
  14565.  
  14566.                     The KEYSTACK command must be executed before running
  14567.                     the program which is going to receive the keystrokes.
  14568.                     This places the keystrokes into the buffer first, so
  14569.                     the program can find them when it runs.
  14570.  
  14571.                     KEYSTACK will only work if the memory-resident program
  14572.                     KSTACK.COM has been loaded.  KSTACK is usually loaded
  14573.                     from the AUTOEXEC.BAT file (see page 83).  If KSTACK
  14574.                     is not loaded, the KEYSTACK command will display an
  14575.                     error message.  If you are using a multitasking system
  14576.                     such as DESQview or Windows, see your Introduction and
  14577.                     Installation Guide for information on loading KSTACK
  14578.                     within a window.
  14579.  
  14580.                     Characters entered within double quotes ("abc") will
  14581.                     be stored "as is" in the keyboard buffer.  The only
  14582.                     items allowed outside double quotes are key names, key
  14583.                     codes, and the ! and /W options.
  14584.  
  14585.                     See page 31 for a complete listing of key names and a
  14586.                     description of the key name format.
  14587.  
  14588.                     An exclamation mark [!] will clear all pending
  14589.                     keystrokes, both in the KEYSTACK buffer and in the
  14590.                     keyboard buffer.
  14591.  
  14592.                     For example, to start ProComm Plus and skip the
  14593.                     opening screen you could use the command:
  14594.  
  14595.         -------------------------------------------------------------------
  14596.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 254
  14597.  
  14598.                                                         [4DOS]     KEYSTACK
  14599.         -------------------------------------------------------------------
  14600.  
  14601.                          c:\comm> keystack 32 ^ pcplus
  14602.  
  14603.                     This places a space (ASCII code 32) in the buffer,
  14604.                     then runs ProComm Plus.  When ProComm looks for a
  14605.                     keystroke to end the display of the opening screen the
  14606.                     keystroke is already in the buffer, and the opening
  14607.                     screen is removed immediately.
  14608.  
  14609.                     You can store a maximum of 255 characters in the
  14610.                     KEYSTACK buffer.  Each time the KEYSTACK command is
  14611.                     executed, it will clear any remaining keystrokes
  14612.                     stored by a previous KEYSTACK command.
  14613.  
  14614.                     You may need to experiment with your programs and
  14615.                     insert delays (see the /W option) to find a keystroke
  14616.                     sequence that works for a particular program.
  14617.  
  14618.                     Programs that bypass DOS and the BIOS for keyboard
  14619.                     input cannot read keystrokes entered with KEYSTACK.
  14620.                     If you use KEYSTACK and then run such a program, the
  14621.                     keystrokes will not appear in the program, but may
  14622.                     appear at the prompt when you exit the program and
  14623.                     return to 4DOS.
  14624.  
  14625.                  ## KEYSTACK treats the number 0 as a special case; it is
  14626.                     used with programs that flush the keyboard buffer.
  14627.                     When KEYSTACK processes a key value of 0, it tells the
  14628.                     program the buffer is clear, so subsequent keystrokes
  14629.                     will be accepted normally.  Some programs will require
  14630.                     several "0"s before they will accept input; you may
  14631.                     need to experiment to determine the correct number.
  14632.  
  14633.                     For example, the following batch file starts Lotus 1-
  14634.                     2-3 and loads the file specified on the command line
  14635.                     when the batch file is invoked (the KEYSTACK command
  14636.                     should be entered on one line):
  14637.  
  14638.                          pushd c:\123
  14639.                          keystack 0 Enter 0 Enter 0 Enter 0 Enter 0 Enter
  14640.                            "/FR" 0 "%1" Enter
  14641.                          123
  14642.                          popd
  14643.  
  14644.                     The sequence of "0 Enter" pairs tells 1-2-3 that the
  14645.                     keyboard buffer is empty, then passes 1-2-3 a carriage
  14646.                     return, repeating this sequence five times.  This gets
  14647.                     1-2-3 to a point where an empty spreadsheet is
  14648.                     displayed.  The rest of the KEYSTACK line issues a
  14649.                     File Retrieve command (/FR), simulates an empty
  14650.  
  14651.         -------------------------------------------------------------------
  14652.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 255
  14653.  
  14654.                                                         [4DOS]     KEYSTACK
  14655.         -------------------------------------------------------------------
  14656.  
  14657.                     keyboard buffer once more, enters the file name passed
  14658.                     on the batch command line (%1), and finally enters a
  14659.                     carriage return to end the file name.
  14660.  
  14661.                  ## Here's the same command defined as an alias (enter
  14662.                     this on one line):
  14663.  
  14664.                          alias 321 `pushd c:\123 ^ keystack 0 Enter 0
  14665.                          Enter 0 Enter 0 Enter 0 Enter "/FR" 0 "%1" 13 ^
  14666.                          123 ^ popd`
  14667.  
  14668.                  ## Some programs require both the keyboard "scan code"
  14669.                     and the ASCII value to be stacked.  To stack both
  14670.                     codes, calculate the value ((256 * scan code) + ASCII
  14671.                     code) and enter that numeric value as an argument for
  14672.                     KEYSTACK.  For example, for the Enter key, the scan
  14673.                     code is 28 and the ASCII code is 13, so to stack both
  14674.                     values use ((256 * 28) + 13) or KEYSTACK 7181.  Try
  14675.                     this approach if a "normal" KEYSTACK command does not
  14676.                     work (for example, if you use "KEYSTACK 13" or
  14677.                     "KEYSTACK Enter" for the Enter key and the program
  14678.                     doesn't see the correct character).  To stack combined
  14679.                     key codes you must use the numeric value, not the key
  14680.                     name.  See Appendix B on page 357 for a complete list
  14681.                     of ASCII codes and scan codes.
  14682.  
  14683.         Options: ## /W(ait):  Delay the next keystroke in the KEYSTACK
  14684.                     buffer by a specified number of clock "ticks".  A
  14685.                     clock tick is approximately 1/18 second.  The number
  14686.                     of clock ticks to delay should be placed immediately
  14687.                     after the W, and must be between 1 and 65535 (65535
  14688.                     ticks is about 1 hour).  You can use the /W option as
  14689.                     many times as desired and at any point in the string
  14690.                     of keystrokes except within double quotes.  Some
  14691.                     programs may need the delays provided by /W in order
  14692.                     to receive keystrokes properly from KEYSTACK.  The
  14693.                     only way to determine what delay is needed is to
  14694.                     experiment.  Sometimes a combination of a delay and an
  14695.                     "empty buffer" signal (a 0) are required.  For
  14696.                     example, to start the program CADX and send it an F7,
  14697.                     a delay of one second, an indication that the keyboard
  14698.                     buffer is empty, and a carriage return:
  14699.  
  14700.                          c:\> keystack F7 /W18 0 Enter ^ cadx
  14701.  
  14702.  
  14703.  
  14704.  
  14705.  
  14706.  
  14707.         -------------------------------------------------------------------
  14708.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 256
  14709.  
  14710.                                                    [4DOS]     LH / LOADHIGH
  14711.         -------------------------------------------------------------------
  14712.  
  14713.         LH / LOADHIGH  [4DOS]                                  (Compatible)
  14714.  
  14715.         Purpose:    Load a memory resident program into an Upper Memory
  14716.                     Block (UMB).
  14717.  
  14718.         Format:     LH [/L:r1,n1;r2,n2;... /S] filename
  14719.                          or
  14720.                     LOADHIGH [/L:r1,n1;r2,n2;... /S] filename
  14721.  
  14722.                     filename:    The name of the program to load into high
  14723.                                  memory.
  14724.  
  14725.                     /L(oad region)           /S(hrink)
  14726.  
  14727.         Usage:      LH and LOADHIGH are synonyms.  You can use either one.
  14728.  
  14729.                     LOADHIGH requires version 5.0 or later of MS-DOS, PC-
  14730.                     DOS, DR DOS, or Novell DOS, or an OS/2 2.x DOS
  14731.                     session.
  14732.  
  14733.                     If you load memory-resident programs into UMBs, you
  14734.                     will have more room in base memory for application
  14735.                     programs.  If your system has no UMBs, or if the
  14736.                     program is larger than the largest UMB, then LOADHIGH
  14737.                     will load the program into conventional base memory.
  14738.  
  14739.                     For example, to load the program C:\UTIL\CACHE.EXE
  14740.                     into high memory:
  14741.  
  14742.                          c:\> loadhigh c:\util\cache.exe
  14743.  
  14744.                     If you are running MS-DOS / PC-DOS 5.0 or above, or an
  14745.                     OS/2 2.x DOS session, LOADHIGH requires the DOS=UMB
  14746.                     command in your CONFIG.SYS file.  It can only be used
  14747.                     to load programs into UMBs managed by version 5.0 or
  14748.                     later of MS-DOS, PC-DOS, DR DOS, or Novell DOS; or by
  14749.                     OS/2 2.x DOS sessions.
  14750.  
  14751.                  !  If you use a memory manager like 386MAX or QEMM to
  14752.                     manage your UMBs, rather than the MS-DOS DOS=UMB
  14753.                     directive, then LOADHIGH will not work, and you must
  14754.                     use the equivalent command supplied with your memory
  14755.                     manager in order to load programs high.
  14756.  
  14757.                     See your 4DOS Introduction and Installation Guide for
  14758.                     complete details on UMBs and UMB regions, and the
  14759.                     hardware and software required to support them.
  14760.  
  14761.  
  14762.  
  14763.         -------------------------------------------------------------------
  14764.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 257
  14765.  
  14766.                                                    [4DOS]     LH / LOADHIGH
  14767.         -------------------------------------------------------------------
  14768.  
  14769.                  ## The /L and /S switches are designed to aid in
  14770.                     optimizing the use of upper memory by selecting one or
  14771.                     more UMB regions for a particular memory-resident
  14772.                     program to use.  They are fully compatible with the
  14773.                     MS-DOS 6.0 and above memory optimizer, MEMMAKER, and
  14774.                     may also be used under MS-DOS 5.0 and in OS/2 2.x DOS
  14775.                     sessions.  (They are not used by other memory
  14776.                     optimizers, such as QEMM's OPTIMIZE or 386MAX's
  14777.                     MAXIMIZE.)
  14778.  
  14779.                     While a complete discussion of memory optimization
  14780.                     techniques is well beyond the scope of this manual,
  14781.                     the basic technique is to load each memory-resident
  14782.                     program into a specific region to free up the maximum
  14783.                     possible amount of base memory.
  14784.  
  14785.                     Optimizing UMB usage requires a detailed knowledge of
  14786.                     the memory requirements for your memory-resident
  14787.                     programs.  This information can be very difficult to
  14788.                     obtain, because some programs require more memory when
  14789.                     starting and less when running, and each program is
  14790.                     unique.  However, if you know these memory
  14791.                     requirements, you may be able to use /L and /S to
  14792.                     optimize the use of upper memory, or to improve on the
  14793.                     optimization done by MEMMAKER or another memory
  14794.                     optimizer.
  14795.  
  14796.         Options: ## /L:r1,n1;r2,n2;...  (Load region):  Specifies which
  14797.                     region(s) should be used for the program, and
  14798.                     optionally the minimum free space required in a region
  14799.                     before the program is allowed access to that region.
  14800.  
  14801.                     If /L is not used, all upper memory regions are
  14802.                     available to the program.  If /L is used, you must
  14803.                     specify one or more regions (r1, r2, etc.); only those
  14804.                     regions will be made available.  Upper memory regions
  14805.                     are numbered sequentially beginning with 1 (region 0
  14806.                     refers to low memory, and is normally used only by
  14807.                     MEMMAKER).
  14808.  
  14809.                     If only a region number is given, the entire region is
  14810.                     made available to the program (assuming there is free
  14811.                     space in the region).  If a size is given for a
  14812.                     particular region (n1, n2, etc.), then the region is
  14813.                     only made available if the free space in the region is
  14814.                     equal to or greater than that size.  All sizes are in
  14815.                     bytes.  Any region not available to a particular
  14816.                     program is "locked out" while that program is loading
  14817.                     and made available again once the program is loaded.
  14818.  
  14819.         -------------------------------------------------------------------
  14820.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 258
  14821.  
  14822.                                                    [4DOS]     LH / LOADHIGH
  14823.         -------------------------------------------------------------------
  14824.  
  14825.                     If the combination of /L values you use does not
  14826.                     provide sufficient upper memory space for the program
  14827.                     to load, it will be loaded in low memory.
  14828.  
  14829.                     You can combine /L values in several ways.  In each of
  14830.                     the following examples, if the requested space is not
  14831.                     available or is insufficient the program is loaded
  14832.                     into low memory:
  14833.  
  14834.                          lh /l:2 filename
  14835.                               The program can use region 2 only.
  14836.  
  14837.                          lh /l:2;3 filename
  14838.                               The program can use regions 2 and 3 only.
  14839.  
  14840.                          lh /l:2,2048 filename
  14841.                               The program can use region 2 only, and only
  14842.                               if it has 2048 or more bytes free.
  14843.  
  14844.                          lh /l:2,2048;3 filename
  14845.                               The program can use region 2 if it has 2048
  14846.                               or more bytes free, and region 3 regardless
  14847.                               of how many bytes it has free
  14848.  
  14849.                  ## /S(hrink):  Shrinks each region selected by /L to the
  14850.                     minimum size used in /L before loading the program.
  14851.                     This prevents memory-resident programs which take all
  14852.                     available memory from using more than you want them
  14853.                     to.  This switch is primarily intended for use by
  14854.                     MEMMAKER.
  14855.  
  14856.  
  14857.  
  14858.  
  14859.  
  14860.  
  14861.  
  14862.  
  14863.  
  14864.  
  14865.  
  14866.  
  14867.  
  14868.  
  14869.  
  14870.  
  14871.  
  14872.  
  14873.  
  14874.  
  14875.         -------------------------------------------------------------------
  14876.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 259
  14877.  
  14878.                                                                        LIST
  14879.         -------------------------------------------------------------------
  14880.  
  14881.         LIST                                                          (New)
  14882.  
  14883.         Purpose:    Display a file, with forward and backward paging and
  14884.                     scrolling.
  14885.  
  14886.         Format:     LIST [/H /S /W /X] file...
  14887.  
  14888.                     file:        A file or list of files to display.
  14889.  
  14890.                     /H(igh bit off)          /W(rap)
  14891.                     /S(tandard input)        /X (heX display mode)
  14892.  
  14893.                     See also:  TYPE.
  14894.  
  14895.         File Select:Supports extended wildcards, ranges, multiple file
  14896.                     names, and include lists (see pages 57 - 65).
  14897.  
  14898.         Usage:      LIST provides a much faster and more flexible way to
  14899.                     view a file than TYPE, without the overhead of loading
  14900.                     and using a text editor.
  14901.  
  14902.                     LIST is most often used for displaying ASCII text
  14903.                     files.  Most other files contain non-alphabetic
  14904.                     characters and may be unreadable, except in hex mode.
  14905.  
  14906.                     For example, to display a file called MEMO.DOC:
  14907.  
  14908.                          c:\> list memo.doc
  14909.  
  14910.                     LIST uses the cursor pad to scroll through the file.
  14911.                     The following keys have special meanings:
  14912.  
  14913.                          Home              Display the first page of the
  14914.                                            file.
  14915.                          End               Display the last page of the
  14916.                                            file.
  14917.                          Esc               Exit the current file.
  14918.                          Ctrl-C            Quit LIST.
  14919.                          Up Arrow          Scroll up one line.
  14920.                          Down Arrow        Scroll down one line.
  14921.                          Left Arrow        Scroll left 8 columns.
  14922.                          Right Arrow       Scroll right 8 columns.
  14923.                          Ctrl-Left Arrow   Scroll left 40 columns.
  14924.                          Ctrl-Right Arrow  Scroll right 40 columns.
  14925.                          F1                Display online help
  14926.                          F                 Prompt and search for a string.
  14927.                          G                 Go to a specific line.
  14928.                          H                 Toggle the "strip high bit" (/H)
  14929.                                            option.
  14930.  
  14931.         -------------------------------------------------------------------
  14932.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 260
  14933.  
  14934.                                                                        LIST
  14935.         -------------------------------------------------------------------
  14936.  
  14937.                          I                 Display information on the
  14938.                                            current file (the full name,
  14939.                                            size, date, and time).
  14940.                          N                 Find next matching string.
  14941.                          P                 Print the entire file.
  14942.                          W                 Toggle the "line wrap" (/W)
  14943.                                            option.
  14944.                          X                 Toggle the hex-mode display (/X)
  14945.                                            option.
  14946.  
  14947.                     Text searches performed with F and N are not case-
  14948.                     sensitive.  However, if the display is currently in
  14949.                     hexadecimal mode and you press F, you will be prompted
  14950.                     for whether you want to search in hexadecimal as well.
  14951.                     If you answer Y, you should then enter the search
  14952.                     string as a sequence of 2-digit hexadecimal numbers
  14953.                     separated by spaces, for example 41 63 65 (these are
  14954.                     the ASCII values for the string "Ace"; see Appendix B
  14955.                     on page 357 for a complete list of ASCII codes).
  14956.                     Hexadecimal searches are case-sensitive, and search
  14957.                     for exactly the string you enter.
  14958.  
  14959.                     LIST saves the search string used by F and N, so you
  14960.                     can LIST multiple files and search for the same string
  14961.                     simply by pressing N in each file, or repeat your
  14962.                     search the next time you use LIST.
  14963.  
  14964.                     LIST normally allows long lines in the file to extend
  14965.                     past the right edge of the screen.  You can use the
  14966.                     horizontal scrolling keys (see above) to view text
  14967.                     that extends beyond the screen width.  If you use the
  14968.                     W command or /W switch to wrap the display, each line
  14969.                     is wrapped when it reaches the right edge of the
  14970.                     screen, and the horizontal scrolling keys are
  14971.                     disabled.
  14972.  
  14973.                     If you print the file which LIST is displaying, the
  14974.                     print format will match the display format.  If you
  14975.                     have switched to hexadecimal or wrapped mode, that
  14976.                     mode will be used for the printed output as well.  If
  14977.                     you print in wrapped mode, long lines will be wrapped
  14978.                     at the width of the display.  If you print in normal
  14979.                     display mode without line wrap, long lines will be
  14980.                     wrapped or truncated by the printer, not by LIST.
  14981.  
  14982.                     Printed output normally goes to device LPT1.  If you
  14983.                     wish to send the printed output to another device, use
  14984.                     the Printer directive in the .INI file (see page 134).
  14985.  
  14986.  
  14987.         -------------------------------------------------------------------
  14988.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 261
  14989.  
  14990.                                                                        LIST
  14991.         -------------------------------------------------------------------
  14992.  
  14993.                  ## Most of the LIST keystrokes can be reassigned with
  14994.                     .INI file directives (see pages 136 and 141).
  14995.  
  14996.                  ## You can set the colors used by LIST with the
  14997.                     ListColors and ListStatBarColors directives in the
  14998.                     .INI file.  If ListColors is not used, the LIST
  14999.                     display will use the current default colors.  If
  15000.                     ListStatBarColors is not used, the status bar will use
  15001.                     the reverse of the LIST display colors.
  15002.  
  15003.              4DOS## LIST normally writes text directly to the screen.  If
  15004.                     you have an unusual display adapter which does not
  15005.                     support direct video output, see the OutputBIOS
  15006.                     directive on page 143.
  15007.  
  15008.         Options: ## /H(igh bit off):  Strip the high bit from each
  15009.                     character before displaying.  This is useful when
  15010.                     displaying files created by some word processors that
  15011.                     turn on the high bit for formatting purposes.  You can
  15012.                     toggle this option on and off from within LIST with
  15013.                     the H key.
  15014.  
  15015.                     /S(tandard input):  Read from standard input rather
  15016.                     than a file.  This allows you to redirect command
  15017.                     output and view it with LIST.  For example, to use
  15018.                     LIST to display the output of DIR:
  15019.  
  15020.                          c:\> dir | list /s
  15021.  
  15022.                     /W(rap):  Wrap the text at the right edge of the
  15023.                     screen.  This option is useful when displaying files
  15024.                     that don't have a carriage return at the end of each
  15025.                     line.  The horizontal scrolling keys do not work when
  15026.                     the display is wrapped.  You can toggle this option on
  15027.                     and off from within LIST with the W key.
  15028.  
  15029.                     /X (hex mode):  Display the file in hexadecimal (hex)
  15030.                     mode.  This option is useful when displaying
  15031.                     executable files and other files that contain non-text
  15032.                     characters.  Each byte of the file is shown as a pair
  15033.                     of hex characters.  The corresponding text is
  15034.                     displayed to the right of each line of hexadecimal
  15035.                     data.  You can toggle this mode on and off from within
  15036.                     LIST with the X key.
  15037.  
  15038.  
  15039.  
  15040.  
  15041.  
  15042.  
  15043.         -------------------------------------------------------------------
  15044.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 262
  15045.  
  15046.                                                                     LOADBTM
  15047.         -------------------------------------------------------------------
  15048.  
  15049.         LOADBTM                                                       (New)
  15050.  
  15051.         Purpose:    Switch a batch file to or from BTM mode.
  15052.  
  15053.         Format:     LOADBTM [ON | OFF]
  15054.  
  15055.         Usage:      4DOS, 4OS2, and 4DOS/NT recognize two kinds of batch
  15056.                     files: .BAT or .CMD, and .BTM.  Batch files executing
  15057.                     in BTM mode run two to five times faster than in BAT
  15058.                     or CMD mode.  (However, BTM mode should not be used to
  15059.                     load memory-resident programs in DOS, nor should BTM
  15060.                     mode be used for self-modifying batch files.)  Batch
  15061.                     files automatically start in the mode indicated by
  15062.                     their extension.  For more information on .BTM, .BAT,
  15063.                     and .CMD files, see page 77.
  15064.  
  15065.                     The LOADBTM command turns BTM mode on and off.  It can
  15066.                     be used to switch modes in either a .BAT / .CMD or
  15067.                     .BTM file.  If you use LOADBTM with no argument, it
  15068.                     will display the current batch mode:  LOADBTM ON or
  15069.                     LOADBTM OFF.
  15070.  
  15071.                     LOADBTM can only be used within a batch file.  It is
  15072.                     most often used to switch a .BAT file into BTM mode
  15073.                     after memory-resident programs are loaded, to convert
  15074.                     a .BAT or .CMD file to BTM mode without changing its
  15075.                     extension, or to switch a .BTM file into BAT mode in
  15076.                     order to load memory-resident programs under DOS.
  15077.  
  15078.                     Using LOADBTM to repeatedly switch modes within a
  15079.                     batch file is not efficient.  In most cases the speed
  15080.                     gained by running some parts of the file in BTM mode
  15081.                     will be more than offset by the speed lost through
  15082.                     repeated loading of the file each time BTM mode is
  15083.                     invoked.
  15084.  
  15085.                     The following .BAT file fragment loads some memory
  15086.                     resident programs (TSRs), and then switches to BTM
  15087.                     mode:
  15088.  
  15089.                          rem   Loading TSRs...
  15090.                          ansi.com
  15091.                          mouse.com
  15092.                          rem   Switch to high-speed (BTM) mode now that
  15093.                          rem   TSRs are loaded
  15094.                          loadbtm on
  15095.                          path c:\;c:\util;c:\dos
  15096.                          alias /r c:\aliases
  15097.  
  15098.  
  15099.         -------------------------------------------------------------------
  15100.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 263
  15101.  
  15102.                                                                         LOG
  15103.         -------------------------------------------------------------------
  15104.  
  15105.         LOG                                                           (New)
  15106.  
  15107.         Purpose:    Save a log of commands to a disk file.
  15108.  
  15109.         Format:     LOG [/H /W file] [ON | OFF | text]
  15110.  
  15111.                     file:        The name of the file to hold the log.
  15112.                     text:        An optional message that will be added to
  15113.                                  the log.
  15114.  
  15115.                     /H(istory log)           /W(rite to).
  15116.  
  15117.                     See also:  HISTORY.
  15118.  
  15119.         Usage:      LOG keeps a record of all internal and external
  15120.                     commands you use.  Each entry includes the current
  15121.                     system date and time, along with the actual command
  15122.                     after any alias or variable expansion (see page 116
  15123.                     for more information on alias and variable expansion).
  15124.                     You can use the log file as a record of your daily
  15125.                     activities.
  15126.  
  15127.                     LOG with the /H option keeps a similar record, but it
  15128.                     does not record the date and time for each command.
  15129.                     In addition, it records commands before aliases and
  15130.                     variables are expanded.
  15131.  
  15132.                     By default, LOG writes to the file 4DOSLOG,  4OS2LOG,
  15133.                     or 4NTLOG (depending on which command processor you
  15134.                     are using), in the root directory of the boot drive.
  15135.                     The corresponding default file names for LOG /H are
  15136.                     4DOSHLOG,  4OS2HLOG, and 4NTHLOG.
  15137.  
  15138.                     Entering LOG or LOG /H with no parameters displays the
  15139.                     log status (ON or OFF):
  15140.  
  15141.                          c:\> log
  15142.                          LOG is OFF
  15143.  
  15144.                     To enable or disable logging, add the word "ON" or
  15145.                     "OFF" after the LOG command:
  15146.  
  15147.                          c:\> log on
  15148.  
  15149.                     or
  15150.  
  15151.                          c:\> log /h on
  15152.  
  15153.  
  15154.  
  15155.         -------------------------------------------------------------------
  15156.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 264
  15157.  
  15158.                                                                         LOG
  15159.         -------------------------------------------------------------------
  15160.  
  15161.                     Entering LOG or LOG /H with text writes a message to
  15162.                     the log file, even if logging  is set OFF.  This
  15163.                     allows you to enter headers in the log file:
  15164.  
  15165.                          c:\> log "Started work on the database system"
  15166.  
  15167.                     The LOG file format looks like this:
  15168.  
  15169.                          [mm-dd-yy  hh:mm:ss]  command
  15170.  
  15171.                     The LOG /H output can be used as the basis for writing
  15172.                     batch files.  Start LOG /H, then execute the commands
  15173.                     that you want the batch file to execute.  When you are
  15174.                     finished, turn LOG /H off.  The resulting file can be
  15175.                     turned into a batch file that performs the same
  15176.                     commands with little or no editing.
  15177.  
  15178.                     You can have both a regular log (with time and date
  15179.                     stamping) and a history log (without the time stamps)
  15180.                     enabled simultaneously.
  15181.  
  15182.         Options:    /H(istory log):  This option turns on (or off) the
  15183.                     history log, which saves commands without the time and
  15184.                     date stamp.  For example, to turn on history logging
  15185.                     and write to the file C:\LOG\HLOG:
  15186.  
  15187.                          c:\>  log /h /w c:\log\hlog
  15188.  
  15189.                     /W(rite):  This switch specifies a different filename
  15190.                     for the LOG or LOG /H output.  It also automatically
  15191.                     performs a LOG ON command.  For example, to turn
  15192.                     logging on and write the log to C:\LOG\LOGFILE:
  15193.  
  15194.                          c:\> log /w c:\log\logfile
  15195.  
  15196.                     Once you select a new file name with the LOG /W or LOG
  15197.                     /H/W command, LOG will use that file until you issue
  15198.                     another LOG /W or LOG /H/W command, or until you
  15199.                     reboot your computer.  Turning LOG or LOG /H off or on
  15200.                     does not change the file name.  You can set the
  15201.                     default log file names when your command processor
  15202.                     starts with the LogName and HistLogName directives in
  15203.                     the .INI file.
  15204.  
  15205.  
  15206.  
  15207.  
  15208.  
  15209.  
  15210.  
  15211.         -------------------------------------------------------------------
  15212.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 265
  15213.  
  15214.                                                                  MD / MKDIR
  15215.         -------------------------------------------------------------------
  15216.  
  15217.         MD / MKDIR                                               (Enhanced)
  15218.  
  15219.         Purpose:    Create a subdirectory.
  15220.  
  15221.         Format:     MD [/S] pathname...
  15222.                          or
  15223.                     MKDIR [/S] pathname...
  15224.  
  15225.                     pathname:    The name of one or more directories to
  15226.                                  create.
  15227.  
  15228.                     /S(ubdirectories)
  15229.  
  15230.                     See also:  RD.
  15231.  
  15232.         Usage:      MD and MKDIR are synonyms.  You can use either one.
  15233.  
  15234.                     MD creates a subdirectory anywhere in the directory
  15235.                     tree.  To create a subdirectory from the root, start
  15236.                     the pathname with a backslash [\].  For example, this
  15237.                     command creates a subdirectory called MYDIR in the
  15238.                     root directory:
  15239.  
  15240.                          c:\> md \mydir
  15241.  
  15242.                     If no path is given, the new subdirectory is created
  15243.                     in the current directory.  This example creates a
  15244.                     subdirectory called DIRTWO in the current directory:
  15245.  
  15246.                          c:\mydir> md dirtwo
  15247.  
  15248.                     To create a directory from the parent of the current
  15249.                     directory (that is, to create a sibling of the current
  15250.                     directory), start the pathname with two periods and a
  15251.                     backslash [..\].
  15252.  
  15253.                     The operating system limits the permissible length of
  15254.                     the full subdirectory name.  See page 16 for details.
  15255.  
  15256.         Option:     /S(ubdirectories):  MD creates one directory at a time
  15257.                     unless you use the /S option.  If you need to create
  15258.                     the directory C:\ONE\TWO\THREE and none of the named
  15259.                     directories exist, you can use /S to have MD create
  15260.                     all of the necessary subdirectories for you in a
  15261.                     single command:
  15262.  
  15263.                          c:\> md /s \one\two\three
  15264.  
  15265.  
  15266.  
  15267.         -------------------------------------------------------------------
  15268.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 266
  15269.  
  15270.                                                                      MEMORY
  15271.         -------------------------------------------------------------------
  15272.  
  15273.         MEMORY                                                        (New)
  15274.  
  15275.         Purpose:    Display the amount and status of system RAM.
  15276.  
  15277.         Format:     MEMORY
  15278.  
  15279.         Usage:      MEMORY displays information about the RAM in your
  15280.                     system.
  15281.  
  15282.              4DOS   In 4DOS, MEMORY lists the amount of total RAM in your
  15283.                     system and the amount available for applications after
  15284.                     DOS, 4DOS, and memory-resident programs have been
  15285.                     loaded; the amount of EMS expanded memory, XMS
  15286.                     extended memory, and non-XMS extended memory; the HMA
  15287.                     status; and the amount of memory 4DOS is using for
  15288.                     environment variable space, alias space, and history
  15289.                     space:
  15290.  
  15291.                          c:\> memory
  15292.                              655,360 bytes total RAM
  15293.                              534,464 bytes free
  15294.  
  15295.                            1,687,552 bytes total EMS memory
  15296.                            1,097,728 bytes free
  15297.  
  15298.                              914,432 bytes total XMS memory (HMA in use)
  15299.  
  15300.                                  512 bytes total environment
  15301.                                  195 bytes free
  15302.  
  15303.                                1,024 bytes total alias
  15304.                                  452 bytes free
  15305.  
  15306.                                1,024 bytes total history
  15307.  
  15308.                     You can use the information from the MEMORY display to
  15309.                     fine tune your system, to aid in setting the proper
  15310.                     alias and environment sizes in 4DOS.INI, and to be
  15311.                     sure that you have sufficient memory for your largest
  15312.                     applications.
  15313.  
  15314.                     If you compare the free RAM displayed by MEMORY with
  15315.                     the free RAM displayed by CHKDSK and some memory map
  15316.                     programs, MEMORY will usually show a slightly higher
  15317.                     value.  The difference is the size of the environment
  15318.                     passed to these external programs; most memory mapping
  15319.                     programs do not count the passed environment as free
  15320.                     space, but MEMORY does.
  15321.  
  15322.  
  15323.         -------------------------------------------------------------------
  15324.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 267
  15325.  
  15326.                                                                      MEMORY
  15327.         -------------------------------------------------------------------
  15328.  
  15329.                     The MEMORY command displays for 4OS2 and 4DOS/NT are
  15330.                     somewhat different to reflect the way in which OS/2
  15331.                     and Windows NT organize the computer's memory.
  15332.  
  15333.              4OS2   A typical MEMORY display using 4OS2 is shown below:
  15334.  
  15335.                            16,379,904 bytes total physical RAM
  15336.                            40,546,048 bytes total resident RAM
  15337.                             5,050,368 bytes largest free block
  15338.  
  15339.                             3,145,728 bytes total swap file
  15340.  
  15341.                                 4,096 bytes total environment
  15342.                                 2,451 bytes free
  15343.  
  15344.                                 4,096 bytes total alias
  15345.                                 1,910 bytes free
  15346.  
  15347.                                 1,024 bytes total history
  15348.  
  15349.              4NT    A typical MEMORY display using 4DOS/NT is shown below:
  15350.  
  15351.                                  21 % Memory load
  15352.  
  15353.                            16,449,536 bytes total physical RAM
  15354.                             3,665,920 bytes available physical RAM
  15355.  
  15356.                            37,715,968 bytes total page file
  15357.                            19,038,208 bytes available page file
  15358.  
  15359.                                 4,096 bytes total environment
  15360.                                 3,192 bytes free
  15361.  
  15362.                                32,768 bytes total alias
  15363.                                32,767 bytes free
  15364.  
  15365.                                 1,024 bytes total history
  15366.  
  15367.  
  15368.  
  15369.  
  15370.  
  15371.  
  15372.  
  15373.  
  15374.  
  15375.  
  15376.  
  15377.  
  15378.  
  15379.         -------------------------------------------------------------------
  15380.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 268
  15381.  
  15382.                                                                        MOVE
  15383.         -------------------------------------------------------------------
  15384.  
  15385.         MOVE                                                          (New)
  15386.  
  15387.         Purpose:    Move files to a new directory and drive.
  15388.  
  15389.         Format:     MOVE  [/C /D /F /H /N /P /Q /R /S /T /U] source...
  15390.                          destination
  15391.  
  15392.                     source:      A file or list of files to move.
  15393.                     destination: The new location for the files.
  15394.  
  15395.                     /C(hanged)               /Q(uiet)
  15396.                     /D(irectory)             /R(eplace)
  15397.                     /F(orce delete)          /S(ubdirectory tree)
  15398.                     /H(idden and system)     /T(otal)
  15399.                     /N(othing)               /U(pdate)
  15400.                     /P(rompt)
  15401.  
  15402.                     See also:  COPY and RENAME.
  15403.  
  15404.         File Select:Supports extended wildcards, ranges, multiple file
  15405.                     names, and include lists (see pages 57 - 65).  Date,
  15406.                     time, or size ranges anywhere on the line apply to all
  15407.                     source files.
  15408.  
  15409.         Usage:      The MOVE command moves one or more files from one
  15410.                     directory to another, whether the directories are on
  15411.                     the same drive or not.  It has the same effect as
  15412.                     copying the files to a new location and then deleting
  15413.                     the originals.  Like COPY and RENAME, MOVE works with
  15414.                     single files, multiple files, and sets of files
  15415.                     specified with an include list.
  15416.  
  15417.                     The simplest MOVE command moves a single source file
  15418.                     to a new location and, optionally, gives it a new
  15419.                     name.  These two examples both move one file from
  15420.                     drive C: to the root directory on drive A:
  15421.  
  15422.                          c:\> move myfile.dat a:\
  15423.                          c:\> move myfile.dat a:\savefile.dat
  15424.  
  15425.                     In both cases, MYFILE.DAT is removed from drive C:
  15426.                     after it has been copied to drive A:.  If a file
  15427.                     called MYFILE.DAT in the first example, or
  15428.                     SAVEFILE.DAT in the second example, already existed on
  15429.                     drive A:, it would be overwritten.  (This demonstrates
  15430.                     the difference between MOVE and RENAME.  MOVE will
  15431.                     move files between drives and will overwrite the
  15432.                     destination file if it exists; RENAME will not.)
  15433.  
  15434.  
  15435.         -------------------------------------------------------------------
  15436.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 269
  15437.  
  15438.                                                                        MOVE
  15439.         -------------------------------------------------------------------
  15440.  
  15441.                     If you MOVE multiple files, the destination must be a
  15442.                     directory name.  MOVE will move each file into the
  15443.                     destination directory with its original name (if the
  15444.                     target is not a directory, MOVE will display an error
  15445.                     message and exit):
  15446.  
  15447.                          c:\> move *.wks *.txt c:\finance\myfiles
  15448.  
  15449.                     You cannot move a file to a character device like the
  15450.                     printer, or to itself.
  15451.  
  15452.                     When you move files to another directory, if you add a
  15453.                     backslash [\] to the end of the destination name MOVE
  15454.                     will display an error message if the name does not
  15455.                     refer to an existing directory.  You can use this
  15456.                     feature to keep MOVE from treating a mistyped
  15457.                     destination directory name as a file name, and
  15458.                     attempting to move all source files to that name.  The
  15459.                     /D option performs the same function but will also
  15460.                     prompt to see if you want to create the destination
  15461.                     directory if it doesn't exist.
  15462.  
  15463.                  !  Be careful when you use MOVE with the SELECT command.
  15464.                     If you SELECT multiple files and the target is not a
  15465.                     directory (for example, because of a misspelling),
  15466.                     MOVE will assume it is a file name.  In this case each
  15467.                     file will be moved in turn to the target file,
  15468.                     overwriting the previous file, and then the original
  15469.                     will be erased before the next file is moved.  At the
  15470.                     end of the command, all of the original files will
  15471.                     have been erased and only the last file will exist as
  15472.                     the target file.  You can avoid this problem by using
  15473.                     square brackets with SELECT instead of parentheses (be
  15474.                     sure that you don't allow the command line to get too
  15475.                     long - watch the character count in the upper left
  15476.                     corner while you're selecting files).  MOVE will then
  15477.                     receive one list of files to move instead of a series
  15478.                     of individual filenames, and it will detect the error
  15479.                     and halt.  You can also add a backslash [\] to the end
  15480.                     of the destination name to ensure that it is the name
  15481.                     of a subdirectory (see above).
  15482.  
  15483.                  ## MOVE first attempts to rename the file(s), which is
  15484.                     the fastest way to move files between subdirectories
  15485.                     on the same drive.  If that fails (the destination is
  15486.                     on a different drive or already exists), MOVE will
  15487.                     copy the file(s) and then delete the originals.
  15488.  
  15489.  
  15490.  
  15491.         -------------------------------------------------------------------
  15492.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 270
  15493.  
  15494.                                                                        MOVE
  15495.         -------------------------------------------------------------------
  15496.  
  15497.                  ## If you are using 4DOS in an OS/2 DOS session, MOVE
  15498.                     will copy OS/2 extended attributes from the source to
  15499.                     the destination, provided the file system on the
  15500.                     destination drive supports them.
  15501.  
  15502.                  ## If MOVE must physically copy the files and delete the
  15503.                     originals, rather than renaming them (see above), then
  15504.                     some disk space may be freed on the source drive.  The
  15505.                     free space may be the result of moving the files to
  15506.                     another drive, or of overwriting a larger destination
  15507.                     file with a smaller source file.  MOVE displays the
  15508.                     amount of disk space recovered unless the /Q option is
  15509.                     used (see below).  It does so by comparing the amount
  15510.                     of free disk space before and after the MOVE command
  15511.                     is executed.  However, this amount may be incorrect if
  15512.                     you are using a deletion tracking system which stores
  15513.                     deleted files in a hidden directory, or if, under a
  15514.                     multitasking system, another program performs a file
  15515.                     operation while the MOVE command is executed.
  15516.  
  15517.                  ## When physically copying files, MOVE preserves the
  15518.                     hidden, system, and read-only attributes of the source
  15519.                     files, and sets the archive attribute of the
  15520.                     destination files.  However, if the files can be
  15521.                     renamed, and no copying is required, then the source
  15522.                     file attributes are not changed.
  15523.  
  15524.         Options:    /C(hanged files):  Move files only if the destination
  15525.                     file exists and is older than the source (see also
  15526.                     /U).  This option is useful for updating the files in
  15527.                     one directory from those in another without moving any
  15528.                     newly-created files.
  15529.  
  15530.                     /D(irectory):  Requires that the destination be a
  15531.                     directory.  If the destination does not exist, MOVE
  15532.                     will prompt to see if you want to create it.  If the
  15533.                     destination exists as a file, MOVE will fail with an
  15534.                     "Access denied" error.  Use this option to avoid
  15535.                     having MOVE accidentally interpret your destination
  15536.                     name as a file name when it's really a mistyped
  15537.                     directory name.
  15538.  
  15539.                  ## /F(orce delete):  This option is only for use in the
  15540.                     32-bit version of 4OS2, and in 4DOS when running in an
  15541.                     OS/2 2.1 or later DOS session.  It forces deletion of
  15542.                     the source file without saving it to the DELDIR
  15543.                     directory (if DELDIR is not in use, /F has no effect).
  15544.  
  15545.  
  15546.  
  15547.         -------------------------------------------------------------------
  15548.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 271
  15549.  
  15550.                                                                        MOVE
  15551.         -------------------------------------------------------------------
  15552.  
  15553.                  ## /H(idden):  Move all files, including hidden and
  15554.                     system files.
  15555.  
  15556.                     /N(othing):  Do everything except actually move the
  15557.                     file(s).  This option is most useful for testing what
  15558.                     a complex MOVE command will do.
  15559.  
  15560.                     /P(rompt):  Prompt the user to confirm each move.
  15561.                     Your options at the prompt are explained in detail on
  15562.                     page 48.
  15563.  
  15564.                     /Q(uiet):  Don't display filenames, the total number
  15565.                     of files moved, or the amount of disk space recovered,
  15566.                     if any.  This option is most often used in batch
  15567.                     files.  See also /T.
  15568.  
  15569.                     /R(eplace):  Prompt for a Y or N response before
  15570.                     overwriting an existing destination file.
  15571.  
  15572.                     /S(ubdirectories):  Move an entire subdirectory tree
  15573.                     to another location.  MOVE will attempt to create the
  15574.                     destination directories if they don't exist, and will
  15575.                     remove empty subdirectories after the move.  When /D
  15576.                     is used with /S, you will be prompted if the first
  15577.                     destination directory does not exist, but
  15578.                     subdirectories below that will be created
  15579.                     automatically by MOVE.  If you attempt to use /S to
  15580.                     move a subdirectory tree into part of itself, MOVE
  15581.                     will display an error message and halt.
  15582.  
  15583.                     /T(otal):  Don't display filenames as they are moved,
  15584.                     but display the total number of files deleted and the
  15585.                     amount of free disk space recovered, if any.
  15586.  
  15587.                     /U(pdate):  Move each source file only if it is newer
  15588.                     than a matching destination file or if a matching
  15589.                     destination file does not exist (also see /C).  This
  15590.                     option is useful for moving new or changed files from
  15591.                     one directory to another.
  15592.  
  15593.  
  15594.  
  15595.  
  15596.  
  15597.  
  15598.  
  15599.  
  15600.  
  15601.  
  15602.  
  15603.         -------------------------------------------------------------------
  15604.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 272
  15605.  
  15606.                                                        [4DOS/NT]     MSGBOX
  15607.         -------------------------------------------------------------------
  15608.  
  15609.         MSGBOX       [4DOS/NT]                                        (New)
  15610.  
  15611.         Purpose:    Display a message box and collect the user's response.
  15612.  
  15613.         Format:     MSGBOX  OK | OKCANCEL | YESNO | YESNOCANCEL ["title"]
  15614.                          prompt
  15615.  
  15616.                     title:       Text for the title bar of the message box.
  15617.                     prompt:      Text that will appear inside the message
  15618.                                  box.
  15619.  
  15620.         Usage:      MSGBOX can display one of 4 kinds of message boxes and
  15621.                     wait for the user's response.  You can use title and
  15622.                     prompt to display any text you wish.  4DOS/NT
  15623.                     automatically sizes and locates the box on the screen.
  15624.  
  15625.                     The message box may have 1, 2, or 3 response buttons.
  15626.                     The command MSGBOX OK creates a single-button box; the
  15627.                     user must simply acknowledge the prompt text.
  15628.  
  15629.                     The OKCANCEL and YESNO forms have 2 buttons each.  The
  15630.                     YESNOCANCEL form has 3 buttons.  The button the user
  15631.                     chooses is returned in the 4DOS/NT variable %_?.  Be
  15632.                     sure to save the return value in another variable or
  15633.                     test it immediately; the value of %_? changes with
  15634.                     every internal command.
  15635.  
  15636.                     The following list shows the value returned for each
  15637.                     possible selection:
  15638.  
  15639.                          Yes       10           No        11
  15640.                          OK        10           Cancel    12
  15641.  
  15642.                     If you exit the message box without selecting one of
  15643.                     these options (for example, some message boxes allow
  15644.                     you to exit by pressing Esc or double-clicking the
  15645.                     close button), MSGBOX will set %_? to 0.  If there is
  15646.                     an error in the MSGBOX command itself, %_? will be set
  15647.                     as described on page 99.
  15648.  
  15649.  
  15650.  
  15651.  
  15652.  
  15653.  
  15654.  
  15655.  
  15656.  
  15657.  
  15658.  
  15659.         -------------------------------------------------------------------
  15660.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 273
  15661.  
  15662.                                                                          ON
  15663.         -------------------------------------------------------------------
  15664.  
  15665.         ON                                                            (New)
  15666.  
  15667.         Purpose:    Execute a command in a batch file when a specific
  15668.                     condition occurs.
  15669.  
  15670.         Format:     ON BREAK [command]
  15671.                          or
  15672.                     ON ERROR [command]
  15673.  
  15674.         Usage:      ON can only by used in batch files.
  15675.  
  15676.                     ON sets a "watchdog" that remains in effect for the
  15677.                     duration of the current batch file.  Whenever a BREAK
  15678.                     or ERROR condition occurs after ON has been executed,
  15679.                     the command is automatically executed.
  15680.  
  15681.                     ON BREAK will execute its command if the user presses
  15682.                     Ctrl-C or Ctrl-Break.
  15683.  
  15684.                     ON ERROR will execute its command after any command
  15685.                     processor or operating system error (including
  15686.                     critical errors; see page 49).  That is, ON ERROR will
  15687.                     detect errors such as a disk write error, and 4DOS,
  15688.                     4OS2, or 4DOS/NT errors such as a COPY command that
  15689.                     fails to copy any files, or the use of an unacceptable
  15690.                     command option.
  15691.  
  15692.                     ON BREAK and ON ERROR are independent of each other.
  15693.                     You can use either one, or both, in any batch file.
  15694.  
  15695.                     Each time ON BREAK or ON ERROR is used, it defines a
  15696.                     new command to be executed for a break or error, and
  15697.                     any old command is discarded.  If you use ON BREAK or
  15698.                     ON ERROR with no following command, that type of error
  15699.                     handling is disabled.  Error handling is also
  15700.                     automatically disabled when the batch file exits.
  15701.  
  15702.                     ON BREAK and ON ERROR only affect the current batch
  15703.                     file.  If you CALL another batch file, the first batch
  15704.                     file's error handling is suspended, and the CALLed
  15705.                     file must define its own error handling.  When control
  15706.                     returns to the first batch file, its error handling is
  15707.                     reactivated.
  15708.  
  15709.                     The command can be any command that can be used on a
  15710.                     batch file line by itself.  Frequently, it is a GOTO
  15711.                     or GOSUB command.  For example, the following fragment
  15712.                     traps any user attempt to end the batch file by
  15713.                     pressing Ctrl-C or Ctrl-Break.  It scolds the user for
  15714.  
  15715.         -------------------------------------------------------------------
  15716.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 274
  15717.  
  15718.                                                                          ON
  15719.         -------------------------------------------------------------------
  15720.  
  15721.                     trying to end the batch file and then continues
  15722.                     displaying the numbers from 1 to 1000:
  15723.  
  15724.                          on break gosub gotabreak
  15725.                          do i = 1 to 1000
  15726.                            echo %i
  15727.                          enddo
  15728.                          quit
  15729.                          :gotabreak
  15730.                          echo Hey!  Stop that!!
  15731.                          return
  15732.  
  15733.                     You can use a command group (see page 69) as the
  15734.                     command if you want to execute multiple commands, for
  15735.                     example:
  15736.  
  15737.                          on break (echo Oops, got a break!^quit)
  15738.  
  15739.                     ON BREAK and ON ERROR always assume that you want to
  15740.                     continue executing the batch file.  After the command
  15741.                     is executed, control automatically returns to the next
  15742.                     command in the batch file (the command after the one
  15743.                     that was interrupted by the break or error).  The only
  15744.                     way to avoid continuing the batch file after a break
  15745.                     or error is for the command to transfer control to
  15746.                     another point with GOTO, end the batch file with QUIT
  15747.                     or CANCEL, or start another batch file (without
  15748.                     CALLing it).
  15749.  
  15750.                     When handling an error condition with ON ERROR, you
  15751.                     may find it useful to use internal variables (see page
  15752.                     97), particularly %_? and %_SYSERR, to help determine
  15753.                     the cause of the error.
  15754.  
  15755.                  !  If a break or error occurs while the command specified
  15756.                     in ON BREAK or ON ERROR is executing, the command will
  15757.                     be restarted.  This means you must use caution to
  15758.                     avoid or handle any possible errors in the commands
  15759.                     invoked by ON ERROR, since such errors can cause an
  15760.                     infinite loop and/or a stack overflow condition.
  15761.  
  15762.  
  15763.  
  15764.  
  15765.  
  15766.  
  15767.  
  15768.  
  15769.  
  15770.  
  15771.         -------------------------------------------------------------------
  15772.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 275
  15773.  
  15774.                                                                        PATH
  15775.         -------------------------------------------------------------------
  15776.  
  15777.         PATH                                                     (Enhanced)
  15778.  
  15779.         Purpose:    Display or alter the list of directories that 4DOS,
  15780.                     4OS2, or 4DOS/NT will search for executable files,
  15781.                     batch files, and files with executable extensions that
  15782.                     are not in the current directory.
  15783.  
  15784.         Format:     PATH [directory[;directory...]]
  15785.  
  15786.                     directory:   The full name of a directory to include in
  15787.                                  the path setting.
  15788.  
  15789.                     See also:  ESET and SET.
  15790.  
  15791.         Usage:      When the command processor is asked to execute an
  15792.                     external command (a .COM, .EXE, .BTM, .BAT, or .CMD
  15793.                     file or executable extension), it first looks for the
  15794.                     file in the current directory.  If it fails to find an
  15795.                     executable file there, it then searches each of the
  15796.                     directories specified in the PATH setting.  See page
  15797.                     20 for more details on how the path is searched.
  15798.  
  15799.                     For example, after the following PATH command, the
  15800.                     command processor will search for an executable file
  15801.                     in four directories:  the current directory, then the
  15802.                     root directory on drive C, then the DOS subdirectory
  15803.                     on C, and then the UTIL subdirectory on C:
  15804.  
  15805.                          c:\> path c:\;c:\dos;c:\util
  15806.  
  15807.                     The list of directories to search can be set or viewed
  15808.                     with the PATH command.  The list is stored as an
  15809.                     environment string, and can also be set or viewed with
  15810.                     SET, and edited with ESET.
  15811.  
  15812.                     Directory names in the path must be separated by
  15813.                     semicolons [;].  Each directory name is shifted to
  15814.                     upper case to maintain compatibility with programs
  15815.                     which can only recognize upper case directory names in
  15816.                     the path.  If you modify your path with the SET or
  15817.                     ESET command, you may include directory names in lower
  15818.                     case.  These may cause trouble with some programs,
  15819.                     which assume that all path entries have been shifted
  15820.                     to upper case.
  15821.  
  15822.                     If you enter PATH with no parameters, the current path
  15823.                     is displayed:
  15824.  
  15825.                          c:\> path
  15826.  
  15827.         -------------------------------------------------------------------
  15828.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 276
  15829.  
  15830.                                                                        PATH
  15831.         -------------------------------------------------------------------
  15832.  
  15833.                          PATH=C:\;C:\DOS;C:\UTIL
  15834.  
  15835.                     Entering PATH and a semicolon clears the search path
  15836.                     so that only the current directory is searched for
  15837.                     executable files (this is the default at system
  15838.                     startup).
  15839.  
  15840.                     Some applications also use the PATH to search for
  15841.                     their data files.
  15842.  
  15843.                  ## If you include an explicit file extension on a command
  15844.                     name (for example, WP.EXE), the search will find files
  15845.                     with that name and extension in the current directory
  15846.                     and every directory in the path.  It will not locate
  15847.                     other executable files with the same base name.
  15848.  
  15849.                  ## If you have an entry in the path which consists of a
  15850.                     single period [.], the current directory will not be
  15851.                     searched first, but instead will be searched when the
  15852.                     command processor reaches the "." in the path.  This
  15853.                     allows you to delay the search of the current
  15854.                     directory for executable files and files with
  15855.                     executable extensions.  In rare cases, this feature
  15856.                     may not be compatible with applications which use the
  15857.                     path to find their files; if you experience a problem,
  15858.                     you will have to remove the "." from the path while
  15859.                     using any such application.
  15860.  
  15861.              4DOS## In normal use, 4DOS can create a path as long as 250
  15862.                     characters (the command-line limit is 255 characters,
  15863.                     and "PATH " takes five).  However, some DOS
  15864.                     applications expect a path no longer than the
  15865.                     traditional limit of 123 characters.  If you extend
  15866.                     your path beyond this limit and experience problems
  15867.                     with application programs, see Appendix A of the 4DOS
  15868.                     Introduction and Installation Guide for tips on
  15869.                     resolving the difficulty.
  15870.  
  15871.                  ## To create a path longer than the command-line length
  15872.                     limit, use PATH repeatedly to append additional
  15873.                     directories to the path:
  15874.  
  15875.                          path [first list of directories]
  15876.                          path %path;[second list of directories]
  15877.                          ...
  15878.  
  15879.                     You cannot use this method to extend the path beyond
  15880.                     506 characters in 4DOS or 2042 characters in 4OS2 and
  15881.                     4DOS/NT (the internal buffer limits, with room for
  15882.  
  15883.         -------------------------------------------------------------------
  15884.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 277
  15885.  
  15886.                                                                        PATH
  15887.         -------------------------------------------------------------------
  15888.  
  15889.                     "PATH ").  It is usually more efficient to use aliases
  15890.                     to load application programs than to create a long
  15891.                     PATH.  See ALIAS on page 155 for details.
  15892.  
  15893.                     If you specify an invalid directory in the path, it
  15894.                     will be skipped and the search will continue with the
  15895.                     next directory in the path.
  15896.  
  15897.  
  15898.  
  15899.  
  15900.  
  15901.  
  15902.  
  15903.  
  15904.  
  15905.  
  15906.  
  15907.  
  15908.  
  15909.  
  15910.  
  15911.  
  15912.  
  15913.  
  15914.  
  15915.  
  15916.  
  15917.  
  15918.  
  15919.  
  15920.  
  15921.  
  15922.  
  15923.  
  15924.  
  15925.  
  15926.  
  15927.  
  15928.  
  15929.  
  15930.  
  15931.  
  15932.  
  15933.  
  15934.  
  15935.  
  15936.  
  15937.  
  15938.  
  15939.         -------------------------------------------------------------------
  15940.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 278
  15941.  
  15942.                                                                       PAUSE
  15943.         -------------------------------------------------------------------
  15944.  
  15945.         PAUSE                                                    (Enhanced)
  15946.  
  15947.         Purpose:    Suspend batch file or alias execution.
  15948.  
  15949.         Format:     PAUSE [text]
  15950.  
  15951.                     text:  The message to be displayed as a user prompt.
  15952.  
  15953.         Usage:      A PAUSE command will suspend execution of a batch file
  15954.                     or alias, giving you the opportunity to change disks,
  15955.                     turn on the printer, etc.
  15956.  
  15957.                     PAUSE waits for any key to be pressed and then
  15958.                     continues execution.  You can specify the text that
  15959.                     PAUSE displays while it waits for a keystroke, or let
  15960.                     4DOS use the default message:
  15961.  
  15962.                          Press any key when ready...
  15963.  
  15964.                     For example, the following batch file fragment prompts
  15965.                     the user before erasing files (the PAUSE command
  15966.                     should be entered on one line):
  15967.  
  15968.                          pause Press Ctrl-C to abort, any other key to
  15969.                            erase all .LST files
  15970.                          erase *.lst
  15971.  
  15972.                     If you press Ctrl-C or Ctrl-Break while PAUSE is
  15973.                     waiting for a key, execution of an alias will be
  15974.                     terminated, and execution of a batch file will be
  15975.                     suspended while you are asked whether to cancel the
  15976.                     batch job (see page 82).  In a batch file you can
  15977.                     handle Ctrl-C and Ctrl-Break yourself with the ON
  15978.                     BREAK command (see page 274).
  15979.  
  15980.  
  15981.  
  15982.  
  15983.  
  15984.  
  15985.  
  15986.  
  15987.  
  15988.  
  15989.  
  15990.  
  15991.  
  15992.  
  15993.  
  15994.  
  15995.         -------------------------------------------------------------------
  15996.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 279
  15997.  
  15998.                                                                        POPD
  15999.         -------------------------------------------------------------------
  16000.  
  16001.         POPD                                                          (New)
  16002.  
  16003.         Purpose:    Return to the disk drive and directory at the top of
  16004.                     the directory stack.
  16005.  
  16006.         Format:     POPD [*]
  16007.  
  16008.                     See also:  DIRS and PUSHD.
  16009.  
  16010.         Usage:      Each time you use the PUSHD command, it saves the
  16011.                     current disk drive and directory on the internal
  16012.                     directory stack.  POPD restores the last drive and
  16013.                     directory that was saved with PUSHD and removes that
  16014.                     entry from the stack.  You can use these commands
  16015.                     together to change directories, perform some work, and
  16016.                     return to the starting drive and directory.
  16017.  
  16018.                     Directory changes made with POPD are recorded for
  16019.                     display in the directory history window (see page 43).
  16020.  
  16021.                     This example saves and changes the current disk drive
  16022.                     and directory with PUSHD, and then restores it.  The
  16023.                     current directory is shown in the prompt:
  16024.  
  16025.                          c:\> pushd d:\database\test
  16026.                          d:\database\test> pushd c:\wordp\memos
  16027.                          c:\wordp\memos> pushd a:\123
  16028.                          a:\123> popd
  16029.                          c:\wordp\memos> popd
  16030.                          d:\database\test> popd
  16031.                          c:\>
  16032.  
  16033.                     You can use the DIRS command to see the complete list
  16034.                     of saved drives and directories (the directory stack).
  16035.  
  16036.                     The POPD command followed by an asterisk [*] clears
  16037.                     the directory stack without changing the current drive
  16038.                     and directory.
  16039.  
  16040.                  ## If the directory on the top of the stack is not on the
  16041.                     current drive, POPD will switch to the drive and
  16042.                     directory on the top of the stack without changing the
  16043.                     default directory on the current drive.
  16044.  
  16045.  
  16046.  
  16047.  
  16048.  
  16049.  
  16050.  
  16051.         -------------------------------------------------------------------
  16052.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 280
  16053.  
  16054.                                                                      PROMPT
  16055.         -------------------------------------------------------------------
  16056.  
  16057.         PROMPT                                                   (Enhanced)
  16058.  
  16059.         Purpose:    Change the command-line prompt.
  16060.  
  16061.         Format:     PROMPT [text]
  16062.  
  16063.                     text:  Text to be used as the new command-line prompt.
  16064.  
  16065.         Usage:      You can change and customize the command-line prompt
  16066.                     at any time.  The prompt can include normal text, and
  16067.                     system information such as the current drive and
  16068.                     directory, the time and date, and the amount of memory
  16069.                     available.  You can create an informal "Hello, Bob!"
  16070.                     prompt or an official-looking prompt full of
  16071.                     impressive information.
  16072.  
  16073.                     The prompt text can contain special commands in the
  16074.                     form $?, where ? is one of the characters listed
  16075.                     below:
  16076.  
  16077.                          b    The vertical bar character [|].
  16078.                          c    The open parenthesis [(].
  16079.                          d    Current date, in the format:  Fri  Jan 7,
  16080.                               1994.
  16081.                          D    Current date, in the format:  Fri  1-07-94
  16082.                               (the month, day, and year are formatted
  16083.                               according to your current country settings).
  16084.                          e    The ASCII ESC character (decimal 27).
  16085.                          f    The close parenthesis [)].
  16086.                          g    The > character.
  16087.                          h    Backspace over the previous character.
  16088.                          i    Display the OS/2 prompt header line, which
  16089.                               reminds you of how to return to the OS/2
  16090.                               desktop, or get help.
  16091.                          l    The < character.
  16092.                          n    Current drive letter.
  16093.                          p    Current drive and directory (lower case).
  16094.                          P    Current drive and directory (upper case).
  16095.                          q    The = character.
  16096.                          r    The numeric exit code of the last external
  16097.                               command.
  16098.                          s    The space character.
  16099.                          t    Current 24-hour time, in the format
  16100.                               hh:mm:ss.
  16101.                          T    Current 12-hour time, in the format
  16102.                               hh:mm:ss[a|p].
  16103.                          v    Operating system version number, in the
  16104.                               format 3.10.
  16105.  
  16106.  
  16107.         -------------------------------------------------------------------
  16108.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 281
  16109.  
  16110.                                                                      PROMPT
  16111.         -------------------------------------------------------------------
  16112.  
  16113.                          xd:  Current directory on drive d:, in lower
  16114.                               case.
  16115.                          Xd:  Current directory on drive d:, in upper
  16116.                               case.
  16117.                          z    Current shell nesting level; the primary
  16118.                               command processor is shell 0.
  16119.                          $    The $ character.
  16120.                          _    CR/LF (go to beginning of a new line).
  16121.  
  16122.                     For example, to set the prompt to the current date and
  16123.                     time, with a ">" at the end:
  16124.  
  16125.                          c:\> prompt $d $t $g
  16126.                          Fri  Dec 3, 1993 10:29:19 >
  16127.  
  16128.                     To set the prompt to the current date and time,
  16129.                     followed by the current drive and directory in upper
  16130.                     case on the next line, with a ">" at the end:
  16131.  
  16132.                          c:\> prompt $d $t$_$P$g
  16133.                          Fri  Dec 3, 1993 10:29:19
  16134.                          C:\>
  16135.  
  16136.                     Under DOS, you can include the PROMPT command in your
  16137.                     AUTOEXEC.BAT file to set the prompt whenever your
  16138.                     system is rebooted.  The 4OS2 prompt can be set in
  16139.                     CONFIG.SYS (see below), and the prompt for any command
  16140.                     processor can be set in 4START (see page 82), or in
  16141.                     any batch file that runs when the command processor
  16142.                     starts.
  16143.  
  16144.              4DOS   The default prompt is $n$g (drive name plus ">") on
  16145.                     drives A and B, and $p$g (current drive and directory
  16146.                     plus ">") on all other drives.  If you use 4DOS under
  16147.                     OS/2, the SET PROMPT statement in the OS/2 CONFIG.SYS
  16148.                     file (see next paragraph) will override the default
  16149.                     4DOS prompt.  You must delete this statement if you
  16150.                     want to use the default prompt.
  16151.  
  16152.              4OS2   The 4OS2 default prompt is [$n] (drive name in square
  16153.                     brackets) on floppy drives, and [$p] (current drive
  16154.                     and directory in square brackets) on all other drives.
  16155.                     When OS/2 is installed, it inserts a SET PROMPT
  16156.                     statement in CONFIG.SYS to set the prompt to $i[$p].
  16157.                     This prompt will override the 4OS2 defaults.  The $i
  16158.                     adds a header line to the default prompt to remind you
  16159.                     of certain OS/2 keystrokes.  You must delete this
  16160.                     statement if you want to use the default prompt.
  16161.  
  16162.  
  16163.         -------------------------------------------------------------------
  16164.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 282
  16165.  
  16166.                                                                      PROMPT
  16167.         -------------------------------------------------------------------
  16168.  
  16169.              4NT    The 4DOS/NT default prompt is [$n] (drive name in
  16170.                     square brackets) on floppy drives, and [$p] (current
  16171.                     drive and directory in square brackets) on all other
  16172.                     drives.
  16173.  
  16174.                     If you enter PROMPT with no arguments, the prompt will
  16175.                     be reset to its default value.  The PROMPT command
  16176.                     sets the environment variable PROMPT, so to view the
  16177.                     current prompt setting use the command:
  16178.  
  16179.                          c:\> set prompt
  16180.  
  16181.                     (If the prompt is not set at all, the PROMPT
  16182.                     environment variable will not be used, in which case
  16183.                     the SET command above will give a "Not in environment"
  16184.                     error.)
  16185.  
  16186.                  ## Along with literal text, special characters, and ANSI
  16187.                     sequences (under DOS and OS/2), you can include the
  16188.                     text of any environment variable, internal variable,
  16189.                     or variable function (see pages 97 and 105) in a
  16190.                     prompt.  For example, if you want to include the
  16191.                     amount of free memory in the command prompt, plus the
  16192.                     current drive and directory, you could use this
  16193.                     command:
  16194.  
  16195.                          c:\> prompt (%%@dosmem[K]K) $p$g
  16196.                          (601K) c:\data>
  16197.  
  16198.                     Notice that the @DOSMEM function is shown with two
  16199.                     leading percent signs [%].  If you used only one
  16200.                     percent sign, the @DOSMEM function would be expanded
  16201.                     once when the PROMPT command was executed, instead of
  16202.                     every time the prompt is displayed.  As a result, the
  16203.                     amount of memory would never change from the value it
  16204.                     had when you entered the PROMPT command.  You can also
  16205.                     use back-quotes to delay expanding the variable
  16206.                     function until the prompt is displayed:
  16207.  
  16208.                          c:\> prompt `(%@dosmem[K]K) $p$g`
  16209.  
  16210.              4DOS,  ## If you have an ANSI-compatible driver installed
  16211.              4OS2   under 4DOS, or are running 4OS2, you can include ANSI
  16212.                     escape sequences in the PROMPT text.  See your online
  16213.                     help for complete details on ANSI.  This example uses
  16214.                     ANSI sequences to set a prompt that displays the shell
  16215.                     level, date, time and path in color on the top line of
  16216.                     the screen (enter the command as one line):
  16217.  
  16218.  
  16219.         -------------------------------------------------------------------
  16220.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 283
  16221.  
  16222.                                                                      PROMPT
  16223.         -------------------------------------------------------------------
  16224.  
  16225.                          c:\> prompt $e[s$e[1;1f$e[41;1;37m$e[K[$z] $d
  16226.                               Time: $t$h$h$h  Path: $p$e[u$e[0;32m$n$g
  16227.  
  16228.              4NT    You cannot use ANSI escape sequences in your prompt in
  16229.                     4DOS/NT, because Windows NT does not provide ANSI
  16230.                     support.
  16231.  
  16232.                  ## A few older batch files use the PROMPT command to
  16233.                     transmit ANSI.SYS control sequences to the screen (for
  16234.                     example, to redefine function keys).  This technique
  16235.                     will not work with 4DOS and 4OS2, because they don't
  16236.                     display a prompt within batch files; hence, the
  16237.                     characters in the PROMPT string are never sent to
  16238.                     ANSI.SYS.  To send ANSI sequences in 4DOS and 4OS2,
  16239.                     use the ECHO command, substituting an escape character
  16240.                     followed by an e for $e in the PROMPT string (see page
  16241.                     71 for more information on the escape character).
  16242.  
  16243.                  ## You may find it helpful to define a different prompt
  16244.                     in secondary shells, perhaps including $z in the
  16245.                     prompt to display the shell level.  To do so, place a
  16246.                     PROMPT command in your 4START file and use IF or IFF
  16247.                     statements to set the appropriate prompt for different
  16248.                     shells (for an example, see page 105).
  16249.  
  16250.  
  16251.  
  16252.  
  16253.  
  16254.  
  16255.  
  16256.  
  16257.  
  16258.  
  16259.  
  16260.  
  16261.  
  16262.  
  16263.  
  16264.  
  16265.  
  16266.  
  16267.  
  16268.  
  16269.  
  16270.  
  16271.  
  16272.  
  16273.  
  16274.  
  16275.         -------------------------------------------------------------------
  16276.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 284
  16277.  
  16278.                                                                       PUSHD
  16279.         -------------------------------------------------------------------
  16280.  
  16281.         PUSHD                                                         (New)
  16282.  
  16283.         Purpose:    Save the current disk drive and directory, optionally
  16284.                     changing to a new drive and directory.
  16285.  
  16286.         Format:     PUSHD [pathname]
  16287.  
  16288.                     pathname:    The name of the new default drive and
  16289.                                  directory.
  16290.  
  16291.                     See also:  DIRS, POPD and Directory Changes on page
  16292.                     43.
  16293.  
  16294.         Usage:      PUSHD saves the current drive and directory on a "last
  16295.                     in, first out" directory stack.  The POPD command
  16296.                     returns to the last drive and directory that was saved
  16297.                     by PUSHD.  You can use these commands together to
  16298.                     change directories, perform some work, and return to
  16299.                     the starting drive and directory.  The DIRS command
  16300.                     displays the contents of the directory stack.
  16301.  
  16302.                     To save the current drive and directory, without
  16303.                     changing directories, use the PUSHD command by itself,
  16304.                     with no pathname.
  16305.  
  16306.                     If a pathname is specified as part of the PUSHD
  16307.                     command, the current drive and directory are saved and
  16308.                     PUSHD changes to the specified drive and directory.
  16309.                     If the pathname includes a drive letter, PUSHD changes
  16310.                     to the specified directory on the new drive without
  16311.                     changing the current directory on the original drive.
  16312.  
  16313.                     This example saves the current directory and changes
  16314.                     to C:\WORDP\MEMOS, then returns to the original
  16315.                     directory:
  16316.  
  16317.                          c:\> pushd \wordp\memos
  16318.                          c:\wordp\memos> popd
  16319.                          c:\>
  16320.  
  16321.                     Directory changes made with PUSHD are recorded for
  16322.                     display in the directory history window (see page 43).
  16323.  
  16324.                  ## The directory stack can hold up to 255 characters, or
  16325.                     about 10 to 20 entries (depending on the length of the
  16326.                     names).  If you exceed this limit, the oldest entry is
  16327.                     removed before adding a new entry.
  16328.  
  16329.  
  16330.  
  16331.         -------------------------------------------------------------------
  16332.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 285
  16333.  
  16334.                                                                       PUSHD
  16335.         -------------------------------------------------------------------
  16336.  
  16337.                  ## If PUSHD can't change directly to the specified
  16338.                     directory, it will look for the CDPATH variable.  See
  16339.                     page 43 for details on CDPATH.
  16340.  
  16341.  
  16342.  
  16343.  
  16344.  
  16345.  
  16346.  
  16347.  
  16348.  
  16349.  
  16350.  
  16351.  
  16352.  
  16353.  
  16354.  
  16355.  
  16356.  
  16357.  
  16358.  
  16359.  
  16360.  
  16361.  
  16362.  
  16363.  
  16364.  
  16365.  
  16366.  
  16367.  
  16368.  
  16369.  
  16370.  
  16371.  
  16372.  
  16373.  
  16374.  
  16375.  
  16376.  
  16377.  
  16378.  
  16379.  
  16380.  
  16381.  
  16382.  
  16383.  
  16384.  
  16385.  
  16386.  
  16387.         -------------------------------------------------------------------
  16388.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 286
  16389.  
  16390.                                                                        QUIT
  16391.         -------------------------------------------------------------------
  16392.  
  16393.         QUIT                                                          (New)
  16394.  
  16395.         Purpose:    Terminate the current batch file.
  16396.  
  16397.         Format:     QUIT [value]
  16398.  
  16399.                     value:  The exit code from 0 to 255 to return to the
  16400.                     command processor or to the previous batch file.
  16401.  
  16402.                     See also:  CANCEL.
  16403.  
  16404.         Usage:      QUIT provides a simple way to exit a batch file before
  16405.                     reaching the end of the file.  If you QUIT a batch
  16406.                     file called from another batch file, you will be
  16407.                     returned to the previous file at the line following
  16408.                     the original CALL.
  16409.  
  16410.                     This example batch file fragment checks to see if the
  16411.                     user entered "quit" and exits if true.
  16412.  
  16413.                          input  Enter your choice :  %%option
  16414.                          if  "%option" == "quit"  quit
  16415.  
  16416.                     QUIT only ends the current batch file.  To end all
  16417.                     batch file processing, use the CANCEL command.
  16418.  
  16419.                  ## If you specify a value, QUIT will set the ERRORLEVEL
  16420.                     or exit code (see the IF command, and the %? variable
  16421.                     on page 99) to that value.
  16422.  
  16423.                  ## You can also use QUIT to terminate an alias.  If you
  16424.                     QUIT an alias while inside a batch file, QUIT will end
  16425.                     both the alias and the batch file and return you to
  16426.                     the command prompt or to the calling batch file.
  16427.  
  16428.  
  16429.  
  16430.  
  16431.  
  16432.  
  16433.  
  16434.  
  16435.  
  16436.  
  16437.  
  16438.  
  16439.  
  16440.  
  16441.  
  16442.  
  16443.         -------------------------------------------------------------------
  16444.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 287
  16445.  
  16446.                                                                  RD / RMDIR
  16447.         -------------------------------------------------------------------
  16448.  
  16449.         RD / RMDIR                                               (Enhanced)
  16450.  
  16451.         Purpose:    Remove one or more subdirectories.
  16452.  
  16453.         Format:     RD [/S] pathname...
  16454.                          or
  16455.                     RMDIR [/S] pathname...
  16456.  
  16457.                     pathname:    The name of a subdirectory to remove.
  16458.  
  16459.              4NT    /S(ubdirectories)
  16460.  
  16461.                     See also:  MD.
  16462.  
  16463.         File Select:Supports extended wildcards, ranges, multiple file
  16464.                     names, and include lists (see pages 57 - 65).
  16465.  
  16466.         Usage:      RD and RMDIR are synonyms.  You can use either one.
  16467.  
  16468.                     RD removes directories from the directory tree.  For
  16469.                     example, to remove the subdirectory MEMOS from the
  16470.                     subdirectory WP, you can use this command:
  16471.  
  16472.                          c:\> rd \wp\memos
  16473.  
  16474.                     Before using RD, you must delete all files and
  16475.                     subdirectories (and their files) in the pathname you
  16476.                     want to remove.  Remember to remove hidden and read-
  16477.                     only files as well as normal files (you can use DEL /Z
  16478.                     to delete hidden and read-only files).
  16479.  
  16480.                     You can use wildcards in the pathname.
  16481.  
  16482.                  ## You cannot remove the root directory, the current
  16483.                     directory (.), any directory above the current
  16484.                     directory in the directory tree, or any directory in
  16485.                     use by another process in a multitasking system.
  16486.  
  16487.         Options: !  /S(ubdirectories):  This option is included only for
  16488.                  ## compatibility with Windows NT's CMD.EXE, and should be
  16489.              4NT    used with EXTREME CAUTION!  It deletes all files
  16490.                     (including hidden and system files) in the named
  16491.                     directory and all of its subdirectories, then removes
  16492.                     all empty subdirectories.  This option does not prompt
  16493.                     for permission before deleting files and
  16494.                     subdirectories, and can potentially erase all files on
  16495.                     a drive with a single command.
  16496.  
  16497.  
  16498.  
  16499.         -------------------------------------------------------------------
  16500.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 288
  16501.  
  16502.                                                                      REBOOT
  16503.         -------------------------------------------------------------------
  16504.  
  16505.         REBOOT                                                        (New)
  16506.  
  16507.         Purpose:    Do a warm or cold system reboot.
  16508.  
  16509.         Format:     REBOOT [/C /S /V]
  16510.  
  16511.                     /C(old reboot)           /V(erify)
  16512.                     /S(hutdown)
  16513.  
  16514.         ##  Usage:  REBOOT will completely restart your computer.  It
  16515.                     normally performs a warm reboot, which is comparable
  16516.                     to pressing Ctrl-Alt-Delete under DOS or OS/2, or to a
  16517.                     shutdown and restart under Windows NT.  Under DOS,
  16518.                     REBOOT can also perform a cold reboot, which is
  16519.                     comparable to turning the power off and back on or
  16520.                     pressing the reset button.  A reboot is necessary to
  16521.                     activate any changes to your CONFIG.SYS file in DOS
  16522.                     and OS/2, and may also be used if you wish to restart
  16523.                     DOS with an altered 4START or AUTOEXEC.BAT file.
  16524.  
  16525.                     The following example prompts you to verify the
  16526.                     reboot, then does a warm boot:
  16527.  
  16528.                          c:\> reboot /v
  16529.  
  16530.                     REBOOT defaults to performing a warm boot, with no
  16531.                     prompting.
  16532.  
  16533.                     REBOOT flushes the disk buffers, resets the drives,
  16534.                     and waits one second before rebooting, to allow disk
  16535.                     caching programs to finish writing any cached data.
  16536.                     4OS2 and 4DOS/NT issue the proper commands to shut
  16537.                     down the operating system before rebooting.
  16538.  
  16539.              4DOS   !  Under DOS, some system BIOSes, memory managers,
  16540.                     multitaskers, or memory-resident programs (TSRs) may
  16541.                     intercept attempts to reboot your system and defeat
  16542.                     them entirely, convert a cold boot request to a warm
  16543.                     boot or vice versa, or in very rare cases, hang the
  16544.                     system - requiring a reboot!  As a result you may need
  16545.                     to experiment with which reboot options work best for
  16546.                     your system hardware and software configuration, and
  16547.                     under rare circumstances REBOOT may not be usable on
  16548.                     your system.
  16549.  
  16550.           4OS2 ! ## Under OS/2, REBOOT must use the DOS.SYS device driver
  16551.                     to reboot your system.  DOS.SYS is loaded via a
  16552.                     DEVICE= statement in your CONFIG.SYS file.  If DOS.SYS
  16553.                     is not loaded, REBOOT will not work.
  16554.  
  16555.         -------------------------------------------------------------------
  16556.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 289
  16557.  
  16558.                                                                      REBOOT
  16559.         -------------------------------------------------------------------
  16560.  
  16561.         Options:    /C(old):  Do a "cold" reboot.  This is similar to
  16562.                     turning the power off and back on, and may be
  16563.                     necessary to properly initialize the system.
  16564.              4DOS   REBOOT /C may not physically reset all hardware
  16565.                     devices as thoroughly as actually turning off the
  16566.                     power; its effect depends on the internal design of
  16567.                     each hardware device and on your system configuration.
  16568.  
  16569.              4OS2,  /S(hutdown):  Shut down the system, but do not reboot.
  16570.              4NT    This option is equivalent to clicking the "Shutdown"
  16571.                     choice on the OS/2 2.x Workplace Shell popup menu, or
  16572.                     using the Shutdown choice on the Program Manager's
  16573.                     File menu in Windows NT.
  16574.  
  16575.                     /V(erify):  Prompt for confirmation (Y or N) before
  16576.                     rebooting.
  16577.  
  16578.  
  16579.  
  16580.  
  16581.  
  16582.  
  16583.  
  16584.  
  16585.  
  16586.  
  16587.  
  16588.  
  16589.  
  16590.  
  16591.  
  16592.  
  16593.  
  16594.  
  16595.  
  16596.  
  16597.  
  16598.  
  16599.  
  16600.  
  16601.  
  16602.  
  16603.  
  16604.  
  16605.  
  16606.  
  16607.  
  16608.  
  16609.  
  16610.  
  16611.         -------------------------------------------------------------------
  16612.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 290
  16613.  
  16614.                                                                         REM
  16615.         -------------------------------------------------------------------
  16616.  
  16617.         REM                                                    (Compatible)
  16618.  
  16619.         Purpose:    Put a comment in a batch file.
  16620.  
  16621.         Format:     REM [comment]
  16622.  
  16623.                     comment:     The text to include in the batch file.
  16624.  
  16625.         Usage:      The REM command lets you place a remark or comment in
  16626.                     a batch file.  Batch file comments are useful for
  16627.                     documenting the purpose of a batch file and the
  16628.                     procedures you have used.  For example:
  16629.  
  16630.                          rem This batch file provides a
  16631.                          rem menu-based system for accessing
  16632.                          rem word processing utilities.
  16633.                          rem
  16634.                          rem Clear the screen and get selection
  16635.                          cls
  16636.  
  16637.                     REM must be followed by a space or tab character and
  16638.                     then your comment.  Comments can be up to 255
  16639.                     characters long in 4DOS, or 1023 characters long in
  16640.                     4OS2 and 4DOS/NT.  4DOS, 4OS2, and 4DOS/NT will
  16641.                     normally ignore everything on the line after the REM
  16642.                     command, including quote characters, redirection
  16643.                     symbols, and other commands (see below for the
  16644.                     exception to this rule).
  16645.  
  16646.                     If ECHO is ON, the comment is displayed.  Otherwise,
  16647.                     it is ignored.  If ECHO is ON and you don't want to
  16648.                     display the line, preface the REM command with an at
  16649.                     sign [@].
  16650.  
  16651.                  ## You can use REM to create a zero-byte file if you use
  16652.                     a redirection symbol immediately after the REM
  16653.                     command.  For example, to create the zero-byte file
  16654.                     C:\FOO:
  16655.  
  16656.                          c:\> rem>foo
  16657.  
  16658.                     (This capability is included for compatibility with
  16659.                     COMMAND.COM and CMD.EXE.  A simpler method for
  16660.                     creating a zero-byte file with 4DOS, 4OS2, or 4DOS/NT
  16661.                     is to enter  >filename as a command, with no actual
  16662.                     command before the [>] redirection character.)
  16663.  
  16664.  
  16665.  
  16666.  
  16667.         -------------------------------------------------------------------
  16668.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 291
  16669.  
  16670.                                                                REN / RENAME
  16671.         -------------------------------------------------------------------
  16672.  
  16673.         REN / RENAME                                             (Enhanced)
  16674.  
  16675.         Purpose:    Rename files or subdirectories.
  16676.  
  16677.         Format:     REN [/N /P /Q /S /T] old_name... new_name
  16678.                          or
  16679.                     RENAME [/N /P /Q /S /T] old_name... new_name
  16680.  
  16681.                     old_name:    Original name of the file(s) or
  16682.                                  subdirectory.
  16683.                     new_name:    New name to use, or new path on the same
  16684.                                  drive.
  16685.  
  16686.                     /N(othing)               /S(ubdirectory)
  16687.                     /P(rompt)                /T(otal)
  16688.                     /Q(uiet)
  16689.  
  16690.                     See also:  COPY and MOVE.
  16691.  
  16692.         File Select:Supports extended wildcards, ranges, multiple file
  16693.                     names, and include lists (see pages 57 - 65).
  16694.  
  16695.         Usage:      REN and RENAME are synonyms.  You may use either one.
  16696.  
  16697.                     REN lets you change the name of a file or a
  16698.                     subdirectory, or move one or more files to a new
  16699.                     subdirectory on the same drive.  (If you want to move
  16700.                     files to a different drive, use MOVE.)
  16701.  
  16702.                     In its simplest form, you simply give REN the old_name
  16703.                     of an existing file or subdirectory and then a
  16704.                     new_name.  The new_name must not already exist - you
  16705.                     can't give two files the same name (unless they are in
  16706.                     different directories).  The first example renames the
  16707.                     file MEMO.TXT to MEM.TXT.  The second example changes
  16708.                     the name of the \WORD directory to \WP:
  16709.  
  16710.                          c:\> rename memo.txt mem.txt
  16711.                          c:\> rename \word \wp
  16712.  
  16713.                     You can also use REN to rename a group of files that
  16714.                     you specify with wildcards, as multiple files, or in
  16715.                     an include list.  When you do, the new_name must use
  16716.                     one or more wildcards to show what part of each
  16717.                     filename to change.  Both of the next two examples
  16718.                     change the extensions of multiple files to .SAV:
  16719.  
  16720.                          c:\> ren config.sys autoexec.bat 4start.btm *.sav
  16721.                          c:\> ren *.txt *.sav
  16722.  
  16723.         -------------------------------------------------------------------
  16724.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 292
  16725.  
  16726.                                                                REN / RENAME
  16727.         -------------------------------------------------------------------
  16728.  
  16729.                     REN can move files to a different subdirectory on the
  16730.                     same drive.  When it is used for this purpose, REN
  16731.                     requires one or more filenames for the old_name and a
  16732.                     directory name for the new_name:
  16733.  
  16734.                          c:\> ren memo.txt \wp\memos\
  16735.                          c:\> ren oct.dat nov.dat \data\save\
  16736.  
  16737.                     The final backslash in the last two examples is
  16738.                     optional.  If you use it, you force REN to recognize
  16739.                     the last argument as the name of a directory, not a
  16740.                     file.  The advantage of this approach is that if you
  16741.                     accidentally mistype the directory name, REN will
  16742.                     report an error instead of renaming your files in a
  16743.                     way that you didn't intend.
  16744.  
  16745.                     Finally, REN can move files to a new directory and
  16746.                     change their name at the same time if you specify both
  16747.                     a path and file name for new_name.  In this example,
  16748.                     the files are renamed with an extension of .SAV as
  16749.                     they are moved to a new directory:
  16750.  
  16751.                          c:\> ren *.dat \data\save\*.sav
  16752.  
  16753.                     When new_name refers to a file or files (rather than a
  16754.                     directory), the file(s) must not already exist.  Also,
  16755.                     you cannot rename a subdirectory to a new location on
  16756.                     the directory tree.
  16757.  
  16758.                  ## REN does not change a file's attributes.  The new_name
  16759.                     file(s) will have the same attributes as old_name.
  16760.  
  16761.         Options:    /N(othing):  Do everything except actually rename the
  16762.                     file(s).  This option is useful for testing what a REN
  16763.                     command will actually do.
  16764.  
  16765.                     /P(rompt):  Prompt the user to confirm each rename
  16766.                     operation.  Your options at the prompt are explained
  16767.                     in detail on page 48.
  16768.  
  16769.                     /Q(uiet):  Don't display filenames  or the number of
  16770.                     files renamed.  This option is most often used in
  16771.                     batch files.  See also /T.
  16772.  
  16773.                     /S(ubdirectory):  Normally, you can rename a
  16774.                     subdirectory only if you do not use any wildcards in
  16775.                     the new_name.  This prevents subdirectories from being
  16776.                     renamed inadvertently when a group of files is being
  16777.  
  16778.  
  16779.         -------------------------------------------------------------------
  16780.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 293
  16781.  
  16782.                                                                REN / RENAME
  16783.         -------------------------------------------------------------------
  16784.  
  16785.                     renamed with wildcards.  /S will let you rename a
  16786.                     subdirectory even when you use wildcards.
  16787.  
  16788.                     /T(otal):  Don't display filenames as they are
  16789.                     renamed, but report the number of files renamed.  See
  16790.                     also /Q.
  16791.  
  16792.  
  16793.  
  16794.  
  16795.  
  16796.  
  16797.  
  16798.  
  16799.  
  16800.  
  16801.  
  16802.  
  16803.  
  16804.  
  16805.  
  16806.  
  16807.  
  16808.  
  16809.  
  16810.  
  16811.  
  16812.  
  16813.  
  16814.  
  16815.  
  16816.  
  16817.  
  16818.  
  16819.  
  16820.  
  16821.  
  16822.  
  16823.  
  16824.  
  16825.  
  16826.  
  16827.  
  16828.  
  16829.  
  16830.  
  16831.  
  16832.  
  16833.  
  16834.  
  16835.         -------------------------------------------------------------------
  16836.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 294
  16837.  
  16838.                                                                      RETURN
  16839.         -------------------------------------------------------------------
  16840.  
  16841.         RETURN                                                        (New)
  16842.  
  16843.         Purpose:    Return from a GOSUB (subroutine) in a batch file.
  16844.  
  16845.         Format:     RETURN
  16846.  
  16847.                     See also:  GOSUB.
  16848.  
  16849.         Usage:      4DOS, 4OS2, and 4DOS/NT allow subroutines in batch
  16850.                     files.
  16851.  
  16852.                     A subroutine begins with a label (a colon followed by
  16853.                     a word) and ends with a RETURN command.
  16854.  
  16855.                     The subroutine is invoked with a GOSUB command from
  16856.                     another part of the batch file.  When a RETURN command
  16857.                     is encountered the subroutine terminates, and
  16858.                     execution of the batch file continues on the line
  16859.                     following the original GOSUB.
  16860.  
  16861.                     The following batch file fragment calls a subroutine
  16862.                     which displays the files in the current directory:
  16863.  
  16864.                          echo Calling a subroutine
  16865.                          gosub subr1
  16866.                          echo Returned from the subroutine
  16867.                          quit
  16868.  
  16869.                          :subr1
  16870.                          dir /a/w
  16871.                          return
  16872.  
  16873.  
  16874.  
  16875.  
  16876.  
  16877.  
  16878.  
  16879.  
  16880.  
  16881.  
  16882.  
  16883.  
  16884.  
  16885.  
  16886.  
  16887.  
  16888.  
  16889.  
  16890.  
  16891.         -------------------------------------------------------------------
  16892.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 295
  16893.  
  16894.                                                                      SCREEN
  16895.         -------------------------------------------------------------------
  16896.  
  16897.         SCREEN                                                        (New)
  16898.  
  16899.         Purpose:    Position the cursor on the screen and optionally
  16900.                     display a message.
  16901.  
  16902.         Format:     SCREEN row column [text]
  16903.  
  16904.                     row:         The new row location for the cursor.
  16905.                     column:      The new column location for the cursor.
  16906.                     text:        Optional text to display at the new cursor
  16907.                                  location.
  16908.  
  16909.                     See also:  ECHO, SCRPUT, TEXT, and VSCRPUT.
  16910.  
  16911.         Usage:      SCREEN allows you to create attractive screen displays
  16912.                     in batch files.  You use it to specify where a message
  16913.                     will appear on the screen.  You can use SCREEN to
  16914.                     create menu displays, logos, etc.  The following batch
  16915.                     file fragment displays a menu:
  16916.  
  16917.                          @echo off
  16918.                          cls
  16919.                          screen 3 10  Select a number from 1 to 4:
  16920.                          screen 6 20  1 - Word Processing
  16921.                          screen 7 20  2 - Spreadsheet
  16922.                          screen 8 20  3 - Telecommunications
  16923.                          screen 9 20  4 - Quit
  16924.  
  16925.                     SCREEN does not change the screen colors.  If you have
  16926.                     ANSI.SYS installed and have set colors with CLS or
  16927.                     COLOR, those colors will be used for the display.  To
  16928.                     display text in specific colors, use SCRPUT or
  16929.                     VSCRPUT.  SCREEN always leaves the cursor at the end
  16930.                     of the displayed text.
  16931.  
  16932.                     The row and column values are zero-based, so on a
  16933.                     standard 25 line by 80 column display, valid rows are
  16934.                     0 - 24 and valid columns are 0 - 79.  You can also
  16935.                     specify the row and column as offsets from the current
  16936.                     cursor position.  Begin the value with a plus sign [+]
  16937.                     to move the cursor down the specified number of rows
  16938.                     or to the right the specified number of columns, or
  16939.                     with a minus sign [-] to move the cursor up or to the
  16940.                     left.  This example prints a string 3 lines above the
  16941.                     current position, in absolute column 10:
  16942.  
  16943.                          screen -3 10 Hello, World!
  16944.  
  16945.  
  16946.  
  16947.         -------------------------------------------------------------------
  16948.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 296
  16949.  
  16950.                                                                      SCREEN
  16951.         -------------------------------------------------------------------
  16952.  
  16953.                     SCREEN checks for a valid row and column, and displays
  16954.                     a "Usage" error message if either value is out of
  16955.                     range.
  16956.  
  16957.  
  16958.  
  16959.  
  16960.  
  16961.  
  16962.  
  16963.  
  16964.  
  16965.  
  16966.  
  16967.  
  16968.  
  16969.  
  16970.  
  16971.  
  16972.  
  16973.  
  16974.  
  16975.  
  16976.  
  16977.  
  16978.  
  16979.  
  16980.  
  16981.  
  16982.  
  16983.  
  16984.  
  16985.  
  16986.  
  16987.  
  16988.  
  16989.  
  16990.  
  16991.  
  16992.  
  16993.  
  16994.  
  16995.  
  16996.  
  16997.  
  16998.  
  16999.  
  17000.  
  17001.  
  17002.  
  17003.         -------------------------------------------------------------------
  17004.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 297
  17005.  
  17006.                                                                      SCRPUT
  17007.         -------------------------------------------------------------------
  17008.  
  17009.         SCRPUT                                                        (New)
  17010.  
  17011.         Purpose:    Position text on the screen and display it in color.
  17012.  
  17013.         Format:     SCRPUT row col [BRIght] [BLInk] fg ON [BRIght] bg text
  17014.  
  17015.                     row:         Starting row
  17016.                     col:         Starting column
  17017.                     fg:          Foreground character color
  17018.                     bg:          Background character color
  17019.                     text:        The text to display
  17020.  
  17021.                     See also:  CLS, ECHO, SCREEN, TEXT, and VSCRPUT.
  17022.  
  17023.         Usage:      SCRPUT allows you to create attractive screen displays
  17024.                     in batch files.  You use it to specify where a message
  17025.                     will appear on the screen and what colors will be used
  17026.                     to display the message text.  You can use SCRPUT to
  17027.                     create menu displays, logos, etc.
  17028.  
  17029.                     SCRPUT works like SCREEN, but allows you to specify
  17030.                     the display colors.  It writes directly to the screen
  17031.                     and does not require ANSI support.  It always leaves
  17032.                     the cursor in its current position.  See page 26 for
  17033.                     details about colors and color names, and notes on the
  17034.                     use of bright background colors.
  17035.  
  17036.                     The row and column are zero-based, so on a standard 25
  17037.                     line by 80 column display, valid rows are 0 - 24 and
  17038.                     valid columns are 0 - 79.  You can also specify the
  17039.                     row and column as offsets from the current cursor
  17040.                     position.  Begin the value with a plus sign [+] to
  17041.                     move down the specified number of rows or to the right
  17042.                     the specified number of columns, or with a minus sign
  17043.                     [-] to move up or to the left.
  17044.  
  17045.                     The following batch file fragment displays a menu in
  17046.                     color:
  17047.  
  17048.                          cls white on blue
  17049.                          scrput 3 10 bri whi on blu Select an option:
  17050.                          scrput 6 20 bri red on blu 1 - Word Processing
  17051.                          scrput 7 20 bri yel on blu 2 - Spreadsheet
  17052.                          scrput 8 20 bri gre on blu 3 - Communications
  17053.                          scrput 9 20 bri mag on blu 4 - Quit
  17054.  
  17055.              4DOS## If you have an unusual display adapter which does not
  17056.                     support the direct video output used by SCRPUT, see
  17057.                     the OutputBIOS directive on page 143.
  17058.  
  17059.         -------------------------------------------------------------------
  17060.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 298
  17061.  
  17062.                                                                      SELECT
  17063.         -------------------------------------------------------------------
  17064.  
  17065.         SELECT                                                        (New)
  17066.  
  17067.         Purpose:    Interactively select files for a command.
  17068.  
  17069.         Format:     SELECT [/A[:][-]rhsda /C[HP] /D /E /I"text"
  17070.                          /O[:][-]acdeginrsu /Z] [command] ...
  17071.                          (files...)...
  17072.  
  17073.                     command:     The command to execute with the selected
  17074.                                  files.
  17075.                     files:       The files from which to select.  File
  17076.                                  names may be enclosed in either
  17077.                                  parentheses or square brackets.  The
  17078.                                  difference is explained below.
  17079.  
  17080.                     /A(ttribute select)      /I (match descriptions)
  17081.                     /C[HP] (Compression)     /O(rder)
  17082.                     /D(isable color coding)  /Z (use FAT format)
  17083.                     /E (use upper case)
  17084.  
  17085.         File Select:Supports extended wildcards, ranges, multiple file
  17086.                     names, and include lists (see pages 57 - 65).  Date,
  17087.                     time, or size ranges must appear immediately after the
  17088.                     SELECT keyword.
  17089.  
  17090.         Usage:      SELECT allows you to select files for internal and
  17091.                     external commands by using a full-screen "point and
  17092.                     shoot" display.  You can have SELECT execute a command
  17093.                     once for each file you select, or have it create a
  17094.                     list of files for a command to work with.  The command
  17095.                     can be an internal command, an alias, an external
  17096.                     command, or a batch file.
  17097.  
  17098.                     If you use parentheses around the files, SELECT
  17099.                     executes the command once for each file you have
  17100.                     selected.  During each execution, one of the selected
  17101.                     files is passed to the command as an argument.  If you
  17102.                     use square brackets around files, the SELECTed files
  17103.                     are combined into a single list, separated by spaces.
  17104.                     The command is then executed once with the entire list
  17105.                     presented as its command-line arguments.
  17106.  
  17107.                     SELECT uses the cursor up, cursor down, PgUp, and PgDn
  17108.                     keys to scroll through the file list.  Use the + key
  17109.                     or the spacebar to select a file (or unselect a marked
  17110.                     file), and the - key to unselect a file.  The * key
  17111.                     will reverse all of the current marks (excluding
  17112.                     subdirectories), and the / key will unmark everything.
  17113.  
  17114.  
  17115.         -------------------------------------------------------------------
  17116.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 299
  17117.  
  17118.                                                                      SELECT
  17119.         -------------------------------------------------------------------
  17120.  
  17121.                     After marking the files, press Enter to execute the
  17122.                     command.
  17123.  
  17124.                     You can select a single file by moving the scroll bar
  17125.                     to the filename and pressing Enter without marking any
  17126.                     other files.
  17127.  
  17128.                     To skip the files listed in the current display and go
  17129.                     on to the next file specification inside the
  17130.                     parentheses or brackets (if any), press the Esc key.
  17131.                     To cancel the current SELECT command entirely, press
  17132.                     Ctrl-C or Ctrl-Break.
  17133.  
  17134.                     In the simplest form of SELECT, you merely specify the
  17135.                     command and then the list of files from which you will
  17136.                     make your selection(s).  For example:
  17137.  
  17138.                          c:\> select copy (*.com *.exe) a:\
  17139.  
  17140.                     will let you select from among the .COM and .EXE files
  17141.                     on the current drive.  It will then invoke the COPY
  17142.                     command to copy each file you select to drive A:.  You
  17143.                     will be able to select first from a list of all .COM
  17144.                     files in the current directory, and then from a list
  17145.                     of all .EXE files.
  17146.  
  17147.                     If you want to select from a list of all the .COM and
  17148.                     .EXE files mixed together, create an include list
  17149.                     inside the parentheses by inserting a semicolon (see
  17150.                     page 65 for information on include lists):
  17151.  
  17152.                          c:\> select copy (*.com;*.exe) a:\
  17153.  
  17154.                     Finally, if you want the SELECT command to send a
  17155.                     single list of files to COPY, instead of invoking COPY
  17156.                     once for each file you select, put the file names in
  17157.                     square brackets instead of parentheses:
  17158.  
  17159.                          c:\> select copy [*.com;*.exe] a:\
  17160.  
  17161.                     If you use brackets, you have to be sure that the
  17162.                     resulting command (the word COPY, the list of files,
  17163.                     and the destination drive in this example) is no more
  17164.                     than 255 characters long for internal commands and no
  17165.                     more than 127 characters long for external commands
  17166.                     under 4DOS.  The line length limit for 4OS2 and
  17167.                     4DOS/NT is 1,023 characters for both internal and
  17168.                     external commands.  The current line length is
  17169.  
  17170.  
  17171.         -------------------------------------------------------------------
  17172.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 300
  17173.  
  17174.                                                                      SELECT
  17175.         -------------------------------------------------------------------
  17176.  
  17177.                     displayed by SELECT while you are marking files to
  17178.                     help you to conform to these limits.
  17179.  
  17180.                     The parentheses or brackets enclosing the file name(s)
  17181.                     can appear anywhere within the command; SELECT assumes
  17182.                     that the first set of parentheses or brackets it finds
  17183.                     is the one containing the list of files from which you
  17184.                     wish to make your selection.
  17185.  
  17186.                     The list of files from which you wish to select can be
  17187.                     further refined by using date, time, and size ranges
  17188.                     (see page 60).  The range must be placed immediately
  17189.                     after the word SELECT.  If the command is an internal
  17190.                     command that supports ranges, an independent range can
  17191.                     also be used in the command itself.
  17192.  
  17193.                  ## If you don't specify a command, the selected
  17194.                     filename(s) will become the command.  For example,
  17195.                     this command defines an alias called UTILS that
  17196.                     selects from the executable files in the directory
  17197.                     C:\UTIL, and then executes them in the order marked
  17198.                     (enter the alias on one line):
  17199.  
  17200.                          c:\> alias utils select
  17201.                                (c:\util\*.com;*.exe;*.btm;*.bat)
  17202.  
  17203.                  ## If you want to use filename completion (see page 40)
  17204.                     to enter the filenames inside the parentheses, type a
  17205.                     space after the opening parenthesis.  Otherwise the
  17206.                     command-line editor will treat the open parenthesis as
  17207.                     the first character of the filename.
  17208.  
  17209.                  ## You can set the default colors used by SELECT with the
  17210.                     SelectColors and SelectStatBarColors directives in the
  17211.                     .INI file (see page 135).  If SelectColors is not
  17212.                     used, the SELECT display will use the current default
  17213.                     colors.  If SelectStatBarColors is not used, the
  17214.                     status bar will use the reverse of the SELECT display
  17215.                     colors.
  17216.  
  17217.                     You can display the filenames in color by setting the
  17218.                     COLORDIR environment variable or using the ColorDir
  17219.                     directive in your .INI file.  See page 30 for details.
  17220.                     To disable directory color coding within SELECT, use
  17221.                     the /D option.
  17222.  
  17223.                     When displaying descriptions, SELECT adds a right
  17224.                     arrow [a] at the end of the line if the description is
  17225.  
  17226.  
  17227.         -------------------------------------------------------------------
  17228.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 301
  17229.  
  17230.                                                                      SELECT
  17231.         -------------------------------------------------------------------
  17232.  
  17233.                     too long to fit on the screen.  This symbol will alert
  17234.                     you to the existence of additional description text.
  17235.  
  17236.                  ## With the /I option, you can select files based on
  17237.                     their descriptions.  SELECT will display files if
  17238.                     their description matches the text after the /I
  17239.                     switch.  The search is not case sensitive.  You can
  17240.                     use wildcards and extended wild cards as part of the
  17241.                     text.
  17242.  
  17243.                  ## When sorting file names and extensions for the SELECT
  17244.                     display, 4DOS, 4OS2, and 4DOS/NT normally assume that
  17245.                     sequences of digits should be sorted numerically (for
  17246.                     example, the file DRAW2 would come before DRAW03
  17247.                     because 2 is numerically smaller than 03), rather than
  17248.                     strictly alphabetically (where DRAW2 would come second
  17249.                     because "2" comes after "0").  You can defeat this
  17250.                     behavior and force a strict alphabetic sort with the
  17251.                     /O:a option.
  17252.  
  17253.              4DOS## SELECT normally writes text directly to the screen.
  17254.                     If you have an unusual display adapter which does not
  17255.                     support direct video output, see the OutputBIOS
  17256.                     directive on page 143.
  17257.  
  17258.           4DOS ! ## If you receive a stack overflow error when using
  17259.                     SELECT in complex, nested command sequences, see the
  17260.                     notes under the StackSize directive on page 143.
  17261.  
  17262.         Options: ## /A(ttribute select):  Display only those files that
  17263.                     have the specified attribute set.  Preceding the
  17264.                     attribute character with a minus [-] will display
  17265.                     files that do not have that attribute set.  Attributes
  17266.                     can also be combined.  The attributes are:
  17267.  
  17268.                             R      Read-only         D    Subdirectory
  17269.                             H      Hidden            A    Archive
  17270.                             S      System
  17271.  
  17272.                     If no attributes are listed at all (e.g., SELECT /A
  17273.                     ...), SELECT will display all files and subdirectories
  17274.                     including hidden and system files.  If attributes are
  17275.                     combined, all the specified attributes must match for
  17276.                     a file to be included in the listing.  For example,
  17277.                     /A:RHS will display only those files with all three
  17278.                     attributes set.  See page 18 for more information on
  17279.                     file attributes.
  17280.  
  17281.  
  17282.  
  17283.         -------------------------------------------------------------------
  17284.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 302
  17285.  
  17286.                                                                      SELECT
  17287.         -------------------------------------------------------------------
  17288.  
  17289.              4DOS   /C(ompression):  Display compression ratios on
  17290.                     compressed drives.  The compression ratio is displayed
  17291.                     instead of the file description.  The ratio is left
  17292.                     blank for directories, for files with a length of 0
  17293.                     bytes, and for files on non-compressed drives.  See
  17294.                     APPNOTES.DOC for a list of supported compression
  17295.                     systems.
  17296.  
  17297.                     Using /CH displays compression ratios like /C, but
  17298.                     bases the calculation on the host drive's cluster
  17299.                     size.  This gives a more accurate picture of the space
  17300.                     saved through compression than is given by /C.
  17301.  
  17302.                     If /CP is used instead of /C, the compression is
  17303.                     displayed as a percentage instead of a ratio.  If /CHP
  17304.                     is used instead of /CH, the host compression is
  17305.                     displayed as a percentage.  The /CHP option must be
  17306.                     entered as shown; you can not use /CPH.
  17307.  
  17308.                     See the DIR /C documentation on page 200 for more
  17309.                     details on how compression ratios are calculated.
  17310.  
  17311.                  ## /D(isable color coding):  Temporarily turn off
  17312.                     directory color coding within SELECT.
  17313.  
  17314.                     /E  (use upper case):  Display filenames in the
  17315.                     traditional upper case format; also see SETDOS /U and
  17316.                     the UpperCase directive in the .INI file.  /E is
  17317.                     ignored under 4OS2 and 4DOS/NT if the display is in
  17318.                     HPFS format.  HPFS and NTFS file names are always
  17319.                     displayed in the case in which they are stored.
  17320.  
  17321.                     /I (match descriptions):  Display filenames by
  17322.                     matching text in their descriptions.  The text can
  17323.                     include wild cards and extended wildcards.  The search
  17324.                     text must be enclosed in quotation marks.  /I will be
  17325.                     ignored if /C or /O:c is also used.
  17326.  
  17327.                     /O(rder):  Set the sort order for the files.  The
  17328.                     order can be any combination of the following options:
  17329.  
  17330.                          -    Reverse the sort order for the next option
  17331.                          a    Sort names and extensions in standard ASCII
  17332.                               order, rather than sorting numerically when
  17333.                               digits are included in the name or extension
  17334.                          c    Sort by compression ratio (the least
  17335.                               compressed file in the list will be
  17336.                               displayed first).  The compression ratios
  17337.                               will be used as the basis of the sort and
  17338.  
  17339.         -------------------------------------------------------------------
  17340.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 303
  17341.  
  17342.                                                                      SELECT
  17343.         -------------------------------------------------------------------
  17344.  
  17345.                               will also be displayed.  If /O:c is used
  17346.                               with /CH or /CHP, the sort will be based on
  17347.                               the host-drive compression ratios.
  17348.                          d    Sort by date and time (oldest first)
  17349.                          e    Sort by extension
  17350.                          g    Group subdirectories together
  17351.                          i    Sort by the file description (ignored if /C
  17352.                               or /O:c is also used)
  17353.                          n    Sort by filename (this is the default)
  17354.                          r    Reverse the sort order for all options
  17355.                          s    Sort by size
  17356.                          u    Unsorted
  17357.  
  17358.              4OS2,  /Z:  Display HPFS and NTFS filenames in FAT format.
  17359.              4NT    Long names will be truncated to 12 characters.  If the
  17360.                     name is longer than 12 characters, it will be followed
  17361.                     by a right arrow [a] to show that one or more
  17362.                     characters have been truncated.
  17363.  
  17364.  
  17365.  
  17366.  
  17367.  
  17368.  
  17369.  
  17370.  
  17371.  
  17372.  
  17373.  
  17374.  
  17375.  
  17376.  
  17377.  
  17378.  
  17379.  
  17380.  
  17381.  
  17382.  
  17383.  
  17384.  
  17385.  
  17386.  
  17387.  
  17388.  
  17389.  
  17390.  
  17391.  
  17392.  
  17393.  
  17394.  
  17395.         -------------------------------------------------------------------
  17396.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 304
  17397.  
  17398.                                                                         SET
  17399.         -------------------------------------------------------------------
  17400.  
  17401.         SET                                                      (Enhanced)
  17402.  
  17403.         Purpose:    Display, create, modify, or delete environment
  17404.                     variables.
  17405.  
  17406.         Format:     SET [/M /P /R filename...] [name[=][value]]
  17407.  
  17408.                     filename:    The name of a file containing variable
  17409.                                  definitions.
  17410.                     name:        The name of the environment variable to
  17411.                                  define or modify.
  17412.                     value:       The new value for the variable.
  17413.  
  17414.                     /M(aster)                /R(ead from file)
  17415.                     /P(ause)
  17416.  
  17417.                     See also:  ESET and UNSET.
  17418.  
  17419.         Usage:      Every program and command inherits an environment,
  17420.                     which is a list of variable names, each of which is
  17421.                     followed by an equal sign and some text.  Many
  17422.                     programs use entries in the environment to modify
  17423.                     their own actions.  4DOS, 4OS2, and 4DOS/NT use
  17424.                     several environment variables (see page 96).  See
  17425.                     pages 21 and 94 for more information on the
  17426.                     environment.
  17427.  
  17428.                     If you simply type the SET command with no options or
  17429.                     arguments, it will display all the names and values
  17430.                     currently stored in the environment.  Typically, you
  17431.                     will see an entry called COMSPEC, an entry called
  17432.                     PATH, an entry called CMDLINE, and whatever other
  17433.                     environment variables you and your programs have
  17434.                     established:
  17435.  
  17436.                          c:\> set
  17437.                          COMSPEC=C:\4DOS.COM
  17438.                          PATH=C:\;C:\DOS;C:\UTIL
  17439.                          CMDLINE=E:\UTIL\MAPMEM.EXE
  17440.  
  17441.                     To add a variable to the environment, type SET, a
  17442.                     space, the variable name, an equal sign, and the text:
  17443.  
  17444.                          c:\> set mine=c:\finance\myfiles
  17445.  
  17446.                     The variable name is converted to upper case by 4DOS
  17447.                     and 4OS2 (for compatibility with CMD.EXE, 4DOS/NT does
  17448.                     not shift variable names to upper case).  The text
  17449.                     after the equal sign will be left just as you entered
  17450.  
  17451.         -------------------------------------------------------------------
  17452.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 305
  17453.  
  17454.                                                                         SET
  17455.         -------------------------------------------------------------------
  17456.  
  17457.                     it.  If the variable already exists, its value will be
  17458.                     replaced with the new text that you entered.
  17459.  
  17460.                  !  Normally you should not put a space on either side of
  17461.                     the equal sign.  A space before the equal sign will
  17462.                     become part of the name; a space after the equal sign
  17463.                     will become part of the value.
  17464.  
  17465.                  !  If you use SET to create a variable with the same name
  17466.                     as one of the 4DOS, 4OS2, or 4DOS/NT internal
  17467.                     variables (see page 97), you will disable the internal
  17468.                     variable.  If you later execute a batch file or alias
  17469.                     that depends on that internal variable, it may not
  17470.                     operate correctly.
  17471.  
  17472.                     To display the contents of a single variable, type SET
  17473.                     plus the variable name:
  17474.  
  17475.                          c:\> set mine
  17476.  
  17477.                     You can edit environment variables with the ESET
  17478.                     command.  To remove variables from the environment,
  17479.                     use UNSET, or type SET plus a variable name and an
  17480.                     equal sign:
  17481.  
  17482.                          c:\> set mine=
  17483.  
  17484.                     The variable name is limited to a maximum of 80
  17485.                     characters.  Under 4DOS, the name and value together
  17486.                     cannot be longer than 255 characters.  In 4OS2 and
  17487.                     4DOS/NT, the maximum length for the name and value
  17488.                     together is 1,023 characters.
  17489.  
  17490.              4DOS## Unless you use /M, SET only affects the environment of
  17491.                     the current command processor and the programs it
  17492.                     executes.  If you EXIT to a parent command processor,
  17493.                     the original environment will be unchanged.
  17494.  
  17495.                     In 4DOS, the size of the environment is specified by
  17496.                     the Environment and EnvFree directives in 4DOS.INI
  17497.                     (see page 126) or by the /E: startup switch (see the
  17498.                     4DOS Introduction and Installation Guide).  In 4OS2
  17499.                     and 4DOS/NT the size of the environment is set
  17500.                     automatically.
  17501.  
  17502.         Options: ## /M(aster):  Display or modify the master environment
  17503.              4DOS   rather than the local environment.  This option only
  17504.                     makes sense in a secondary shell.
  17505.  
  17506.  
  17507.         -------------------------------------------------------------------
  17508.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 306
  17509.  
  17510.                                                                         SET
  17511.         -------------------------------------------------------------------
  17512.  
  17513.                     /P(ause):  Wait for a key to be pressed after each
  17514.                     screen page before continuing the display.  Your
  17515.                     options at the prompt are explained in detail on page
  17516.                     48.
  17517.  
  17518.                  ## /R(ead):  Read environment variables from a file.
  17519.                     This is much faster than loading variables from a
  17520.                     batch file with multiple SET commands.  Each entry in
  17521.                     the file must fit within the command-line length limit
  17522.                     for your command processor:  255 bytes for 4DOS and
  17523.                     1,023 bytes for 4OS2 and 4DOS/NT.  The file is in the
  17524.                     same format as the SET display, so SET /R can accept
  17525.                     as input a file generated by redirecting SET output.
  17526.                     For example, the following commands will save the
  17527.                     environment variables to a file, and then reload them
  17528.                     from that file:
  17529.  
  17530.                               set > varlist
  17531.                               set /r varlist
  17532.  
  17533.                     You can load variables from multiple files by listing
  17534.                     the filenames individually after the /R.  You can add
  17535.                     comments to a variable file by starting the comment
  17536.                     line with a colon [:].
  17537.  
  17538.                     If you are creating a SET /R file by hand, and need to
  17539.                     create an entry that spans multiple lines in the file,
  17540.                     you can do so by terminating each line, except the
  17541.                     last, with an escape character (see page 71).
  17542.                     However, you cannot use this method to exceed the
  17543.                     command-line length limit.
  17544.  
  17545.  
  17546.  
  17547.  
  17548.  
  17549.  
  17550.  
  17551.  
  17552.  
  17553.  
  17554.  
  17555.  
  17556.  
  17557.  
  17558.  
  17559.  
  17560.  
  17561.  
  17562.  
  17563.         -------------------------------------------------------------------
  17564.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 307
  17565.  
  17566.                                                                      SETDOS
  17567.         -------------------------------------------------------------------
  17568.  
  17569.         SETDOS                                                        (New)
  17570.  
  17571.         Purpose:    Display or set the 4DOS, 4OS2, or 4DOS/NT
  17572.                     configuration.
  17573.  
  17574.         Format:     SETDOS [/A? /B? /C? /D /E? /I+|- command /L? /M? /N?
  17575.                          /P? /R? /S?:? /U? /V? /X[+|-]n /Y]
  17576.  
  17577.                     /A(NSI)                  /N(o clobber)
  17578.                     /B(right background)     /P(arameter character)
  17579.                     /C(ompound)              /R(ows)
  17580.                     /D(escriptions)          /S(hape of cursor)
  17581.                     /E(scape character)      /U(pper case)
  17582.                     /I(nternal commands)     /V(erbose)
  17583.                     /L(ine)                  /X (expansion)
  17584.                     /M(ode for editing)      /Y (single step)
  17585.  
  17586.         Usage:      SETDOS allows you to customize certain aspects of
  17587.                     4DOS, 4OS2, or 4DOS/NT to suit your personal tastes or
  17588.                     the configuration of your system.  Each of these
  17589.                     options is described below.
  17590.  
  17591.                     You can display the value of all SETDOS options by
  17592.                     entering the SETDOS command with no parameters.
  17593.  
  17594.                     Most of the SETDOS options can be initialized when the
  17595.                     command processor executes the directives in the .INI
  17596.                     file (see page 130).  The name of the corresponding
  17597.                     directive is listed in square brackets [ ] with each
  17598.                     option below; if none is listed, that option cannot be
  17599.                     set from the .INI file.  You can also define the
  17600.                     SETDOS options in your AUTOEXEC.BAT, 4START, or other
  17601.                     startup file (see page 82), in aliases, or at the
  17602.                     command line.
  17603.  
  17604.                     Secondary shells automatically inherit most
  17605.                     configuration settings currently in effect in the
  17606.                     previous shell.  If values have been changed by SETDOS
  17607.                     since 4DOS, 4OS2, or 4DOS/NT started, the new values
  17608.                     will be passed to the secondary shell.  For details on
  17609.                     inheritance of SETDOS values by secondary shells and
  17610.                     their relationship to the .INI file, see page 123.
  17611.  
  17612.                     SETDOS /I settings are not inherited by secondary
  17613.                     shells.  If you want to use SETDOS /I- to disable
  17614.                     commands in all shells, place the SETDOS command(s) in
  17615.                     your 4START file (see page 82), which is executed when
  17616.                     any shell starts.
  17617.  
  17618.  
  17619.         -------------------------------------------------------------------
  17620.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 308
  17621.  
  17622.                                                                      SETDOS
  17623.         -------------------------------------------------------------------
  17624.  
  17625.                     Many of the options below are marked with## .  If you
  17626.                     are a new user, skip these and read the /M, /S, and /U
  17627.                     options, which are more common.
  17628.  
  17629.         Options: ## /A(NSI)  [ANSI]:  The ANSI option determines whether
  17630.                     4DOS will attempt to use ANSI escape sequences for the
  17631.                     CLS and COLOR
  17632.              4DOS   commands.  4DOS normally determines this itself, but
  17633.                     if you are using a non-standard ANSI driver or your
  17634.                     loading sequence is unusual, you may need to
  17635.                     explicitly inform 4DOS.  /A0 allows 4DOS to determine
  17636.                     automatically whether an ANSI driver is installed (the
  17637.                     default).   /A1 forces 4DOS to assume an ANSI driver
  17638.                     is installed.  /A2 forces 4DOS to assume an ANSI
  17639.                     driver is not installed.  See page 24 for more
  17640.                     information on ANSI drivers.
  17641.  
  17642.              4OS2   The /A(NSI) option and the corresponding ANSI
  17643.                     directive are not available in 4OS2.  ANSI support is
  17644.                     automatically turned on by 4OS2, which assumes that it
  17645.                     remains enabled.
  17646.  
  17647.              4NT    The /A(NSI) option and the corresponding ANSI
  17648.                     directive are not available in 4DOS/NT because Windows
  17649.                     NT does not provide ANSI support.
  17650.  
  17651.              4DOS,  /B(right background)  [BrightBG]:  The BRIGHTBG option
  17652.              4OS2   determines whether 4DOS and 4OS2 configure your video
  17653.                     adapter for blinking text (/B0, the default) or bright
  17654.                     background colors (/B1).  See page 26 for a detailed
  17655.                     discussion of this option.
  17656.  
  17657.                  ## /C(ompound character)  [CommandSep]:  The COMPOUND
  17658.                     option sets the character used for separating multiple
  17659.                     commands on the same line.  The default is the caret
  17660.                     [^] in 4DOS and the ampersand [&] in 4OS2 and 4DOS/NT.
  17661.                     You cannot use any of the redirection characters (| >
  17662.                     <), or the blank, tab, comma, or equal sign as the
  17663.                     command separator.  This example changes the COMPOUND
  17664.                     character to a tilde [~]:
  17665.  
  17666.                          c:\> setdos /c~
  17667.  
  17668.                     If you want to share batch files or aliases between
  17669.                     4DOS and 4OS2 or 4DOS/NT, see page 100 for information
  17670.                     on the %+ variable, which retrieves the current
  17671.                     command separator, and page 72 for details on using
  17672.                     compatible command separators for all the products you
  17673.                     use.
  17674.  
  17675.         -------------------------------------------------------------------
  17676.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 309
  17677.  
  17678.                                                                      SETDOS
  17679.         -------------------------------------------------------------------
  17680.  
  17681.                  ## /D(escriptions)  [Descriptions]:  The DESCRIPTIONS
  17682.                     option controls whether file processing commands like
  17683.                     COPY, DEL, MOVE, and REN process file descriptions
  17684.                     along with the files they belong to.  /D1 turns
  17685.                     description processing on, which is the default.  /D0
  17686.                     turns description processing off.
  17687.  
  17688.                  ## /E(scape character)  [EscapeChar]:  The ESCAPE option
  17689.                     sets the character used to suppress the normal meaning
  17690.                     of the following character.  Any character following
  17691.                     the escape character will be passed unmodified to the
  17692.                     command.  The default escape character is Ctrl-X
  17693.                     (ASCII 24, which appears on screen as an up-arrow [-])
  17694.                     in 4DOS and the caret [^] in 4OS2 and 4DOS/NT.  You
  17695.                     cannot use any of the redirection characters (| > <)
  17696.                     or the blank, tab, comma, or equal sign as the escape
  17697.                     character.  Certain characters (b, c, e, f, n, r, s,
  17698.                     and t) have special meanings when immediately preceded
  17699.                     by the escape character.  See page 71 for additional
  17700.                     details on the escape character.
  17701.  
  17702.                     If you want to share batch files or aliases between
  17703.                     4DOS and 4OS2 or 4DOS/NT, see page 99 for information
  17704.                     on the %= variable, which retrieves the current escape
  17705.                     character, and page 72 for details on using compatible
  17706.                     escape characters for all the products you use.
  17707.  
  17708.                  ## /I(nternal):  The INTERNAL option allows you to
  17709.                     disable or enable internal commands.  To disable a
  17710.                     command, precede the command name with a minus [-].
  17711.                     To re-enable a command, precede it with a plus [+].
  17712.                     For example, to disable the internal LIST command to
  17713.                     force 4DOS to use an external command:
  17714.  
  17715.                          c:\> setdos /i-list
  17716.  
  17717.              4DOS,  ## /L(ine)  [LineInput]:  The LINE option controls how
  17718.              4OS2   4DOS or 4OS2 gets its input from the command line.
  17719.                     /L0 tells the command processor to use character input
  17720.                     (the default).  /L1 tells it to use line input (like
  17721.                     COMMAND.COM and CMD.EXE).  /L1 will disable command-
  17722.                     line editing, history recall, filename completion, and
  17723.                     the directory history window, and will reduce the 4OS2
  17724.                     input length limit from 1023 characters to 255
  17725.                     characters.  It should only be used if it is needed
  17726.                     for compatibility with a specific program.  If you
  17727.                     have a program that requires line input, you can use
  17728.                     the following line in an alias or batch file to change
  17729.                     the line input option just for that single program
  17730.  
  17731.         -------------------------------------------------------------------
  17732.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 310
  17733.  
  17734.                                                                      SETDOS
  17735.         -------------------------------------------------------------------
  17736.  
  17737.                     (change the command separator to an ampersand [&] for
  17738.                     4OS2):
  17739.  
  17740.                          setdos /L1 ^ program %& ^ setdos /L0
  17741.  
  17742.                     See APPNOTES.DOC (for 4DOS) or README.DOC (for 4OS2)
  17743.                     for information on programs which require this option.
  17744.  
  17745.                     /M(ode)  [EditMode]:  The MODE option controls the
  17746.                     initial line editing mode.  To start in overstrike
  17747.                     mode at the beginning of each command line, use /M0
  17748.                     (the default).  To start in insert mode, use /M1.
  17749.  
  17750.                  ## /N(o clobber)  [NoClobber]:  The NOCLOBBER option
  17751.                     controls output redirection (see page 50).  /N0 means
  17752.                     existing files will be overwritten by output
  17753.                     redirection (with >) and that appending (with >>) does
  17754.                     not require the file to exist already.  This is the
  17755.                     default.  /N1 means existing files may not be
  17756.                     overwritten by output redirection, and that when
  17757.                     appending the output file must exist.  A /N1 setting
  17758.                     can be overridden with the [!] character.  If you use
  17759.                     /N1, you may have problems with a few unusual programs
  17760.                     that shell out to run a command with redirection, and
  17761.                     expect to be able to overwrite an existing file.
  17762.  
  17763.                  ## /P(arameter character)  [ParameterChar]:  This option
  17764.                     sets the character used after a percent sign to
  17765.                     specify all or all remaining command-line arguments in
  17766.                     a batch file or alias (e.g., %& or %n&; see pages 79
  17767.                     and 162).  The default is the ampersand [&] for 4DOS
  17768.                     and the dollar sign [$] for 4OS2 and 4DOS/NT.
  17769.  
  17770.                     If you want to share batch files or aliases between
  17771.                     4DOS and 4OS2 or 4DOS/NT, see page 72 for details on
  17772.                     selecting compatible parameter characters for all the
  17773.                     products you use.
  17774.  
  17775.                  ## /R(ows)  [ScreenRows]:  The ROWS option sets the
  17776.                     number of screen rows used by the video display.
  17777.                     Normally 4DOS, 4OS2, and 4DOS/NT detect the screen
  17778.                     size, but if you have a non-standard display you may
  17779.                     need to set it explicitly.  This option does not
  17780.                     affect screen scrolling (that is controlled by your
  17781.                     video driver or, under 4DOS, the BIOS or ANSI.SYS); it
  17782.                     is used only for LIST, SELECT, the paged output
  17783.                     options (i.e., TYPE /P), and error checking in the
  17784.                     screen output commands.
  17785.  
  17786.  
  17787.         -------------------------------------------------------------------
  17788.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 311
  17789.  
  17790.                                                                      SETDOS
  17791.         -------------------------------------------------------------------
  17792.  
  17793.                     /S(hape)  [CursorOver, CursorIns]:  The SHAPE option
  17794.                     sets the cursor shape.  The format is /So:i where o is
  17795.                     the cursor size for overstrike mode, i the cursor size
  17796.                     for insert mode.  The size is entered as a percentage
  17797.                     of the total character height.  The default values are
  17798.                     10:100 (an underscore cursor for overstrike mode, and
  17799.                     a block cursor for insert mode).  Because of the way
  17800.                     video BIOSes and drivers remap the cursor shape, you
  17801.                     may not get a smooth progression in the cursor size
  17802.                     from 0% - 100%.  To disable the cursor, enter /S0:0.
  17803.  
  17804.                     /U(pper)  [UpperCase]:  The UPPER option controls the
  17805.                     default case (upper or lower) for filenames displayed
  17806.                     by internal commands like COPY and DIR.  /U0 displays
  17807.                     file names in lower case (the default).  /U1 displays
  17808.                     file names in the traditional upper case.  The /U
  17809.                     setting is ignored for HPFS and NTFS filenames under
  17810.                     4OS2 and 4DOS/NT.  HPFS and NTFS names are always
  17811.                     displayed in the case in which they are stored.
  17812.  
  17813.                  ## /V(erbose)  [BatchEcho]:  The VERBOSE option controls
  17814.                     the default for command echoing in batch files.  /V0
  17815.                     disables echoing of batch file commands unless ECHO is
  17816.                     explicitly set ON.  /V1, the default setting, enables
  17817.                     echoing of batch file commands unless ECHO is
  17818.                     explicitly set OFF.
  17819.  
  17820.                     /V2 forces echoing of all batch file commands, even if
  17821.                     ECHO is set OFF or the line begins with an "@".  This
  17822.                     allows you to turn echoing on for a batch file without
  17823.                     editing the batch file and removing the ECHO OFF
  17824.                     command(s) within it.  /V2 is intended for debugging,
  17825.                     and can be set with SETDOS, but not with the BatchEcho
  17826.                     directive in 4DOS.INI.  For more information on batch
  17827.                     file debugging see page 86, and /Y (below).
  17828.  
  17829.                  ## /X[+|-]n  (expansion and special characters):  This
  17830.                     option enables and disables alias and environment
  17831.                     variable expansion, and controls whether special
  17832.                     characters have their usual meaning or are treated as
  17833.                     text.  It is most often used in batch files to process
  17834.                     text strings which may contain special characters.
  17835.                     See page 88 for further details on string processing
  17836.                     in batch files, and page 116 for details on alias
  17837.                     expansion, variable expansion, and special characters.
  17838.  
  17839.                     The features enabled or disabled by /X are numbered.
  17840.                     All features are enabled when the command processor
  17841.                     starts, and you can re-enable all features at any time
  17842.  
  17843.         -------------------------------------------------------------------
  17844.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 312
  17845.  
  17846.                                                                      SETDOS
  17847.         -------------------------------------------------------------------
  17848.  
  17849.                     by using /X0.  To disable a particular feature, use
  17850.                     /X-n, where n is the feature number from the list
  17851.                     below.  To re-enable the feature, use /X+n.  To enable
  17852.                     or disable multiple individual features, list their
  17853.                     numbers in sequence after the + or - (e.g. /X-345 to
  17854.                     disable features 3, 4, and 5).
  17855.  
  17856.                     The features are:
  17857.  
  17858.                          1    All alias expansion.
  17859.                          2    Nested alias expansion only.
  17860.                          3    All variable expansion (includes environment
  17861.                               variables, batch file parameters, and alias
  17862.                               parameters).
  17863.                          4    Nested variable expansion only.
  17864.                          5    Multiple commands, conditional commands, and
  17865.                               piping (affects the command separator, ||,
  17866.                               &&, |, and |&).
  17867.                          6    Redirection (affects < , >,  >&, >&>, etc.).
  17868.                          7    Quoting (affects back-quotes [`] and double
  17869.                               quotes ["]).
  17870.                          8    Escape character.
  17871.  
  17872.                     If nested alias expansion is disabled, the first alias
  17873.                     of a command is expanded but any aliases it invokes
  17874.                     are not expanded.  If nested variable expansion is
  17875.                     disabled, each variable is expanded once, but
  17876.                     variables containing the names of other variables are
  17877.                     not expanded further.
  17878.  
  17879.                     For example, to disable all features except alias
  17880.                     expansion while you are processing a text file
  17881.                     containing special characters:
  17882.  
  17883.                          setdos /x-35678
  17884.                          ... [perform text processing here]
  17885.                          setdos /x0
  17886.  
  17887.                  ## /Y (single step):  /Y1 enables single-stepping through
  17888.                     a batch file.  Each command is displayed on the screen
  17889.                     along with a Y/N/R (yes / no / remainder) prompt.
  17890.                     Press Y to execute the command, N to omit the command
  17891.                     and go on to the next, or R to execute the remainder
  17892.                     of the batch file (up to the next SETDOS /Y1 command).
  17893.                     You may also press Ctrl-C or Ctrl-Break to terminate
  17894.                     the batch file.
  17895.  
  17896.                     SETDOS /Y is reset to 0 each time the command
  17897.                     processor returns to the prompt, to avoid leaving
  17898.  
  17899.         -------------------------------------------------------------------
  17900.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 313
  17901.  
  17902.                                                                      SETDOS
  17903.         -------------------------------------------------------------------
  17904.  
  17905.                     single stepping enabled after a batch file completes.
  17906.                     This means that you cannot type SETDOS /Y1 at the
  17907.                     prompt, press Enter, then start a batch file from the
  17908.                     following prompt.  To enable SETDOS /Y1 and run a
  17909.                     batch file from the prompt, place both commands on the
  17910.                     same line, for example:
  17911.  
  17912.                          c:\> setdos /y1 ^ mybatch
  17913.  
  17914.                     For more information on batch file debugging, see page
  17915.                     86, and /V (above).
  17916.  
  17917.  
  17918.  
  17919.  
  17920.  
  17921.  
  17922.  
  17923.  
  17924.  
  17925.  
  17926.  
  17927.  
  17928.  
  17929.  
  17930.  
  17931.  
  17932.  
  17933.  
  17934.  
  17935.  
  17936.  
  17937.  
  17938.  
  17939.  
  17940.  
  17941.  
  17942.  
  17943.  
  17944.  
  17945.  
  17946.  
  17947.  
  17948.  
  17949.  
  17950.  
  17951.  
  17952.  
  17953.  
  17954.  
  17955.         -------------------------------------------------------------------
  17956.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 314
  17957.  
  17958.                                                                    SETLOCAL
  17959.         -------------------------------------------------------------------
  17960.  
  17961.         SETLOCAL                                                      (New)
  17962.  
  17963.         Purpose:    Save a copy of the current disk drive, directory,
  17964.                     environment, and alias list.
  17965.  
  17966.         Format:     SETLOCAL
  17967.  
  17968.                     See also:  ENDLOCAL.
  17969.  
  17970.         Usage:      SETLOCAL is used in batch files to save the default
  17971.                     disk drive and directory, the environment, and the
  17972.                     alias list to a reserved block of memory.  You can
  17973.                     then change their values and later restore the
  17974.                     original values with the ENDLOCAL command.
  17975.  
  17976.                     For example, this batch file fragment saves
  17977.                     everything, removes all aliases so that user aliases
  17978.                     will not affect batch file commands, changes the disk
  17979.                     and directory, modifies a variable, runs a program,
  17980.                     and then restores the original values:
  17981.  
  17982.                          setlocal
  17983.                          unalias *
  17984.                          cdd d:\test
  17985.                          set path=c:\;c:\dos;c:\util
  17986.                          rem run some program here
  17987.                          endlocal
  17988.  
  17989.                     SETLOCAL and ENDLOCAL are not nestable within a batch
  17990.                     file.  However, you can have multiple SETLOCAL /
  17991.                     ENDLOCAL pairs within a batch file, and nested batch
  17992.                     files can each have their own SETLOCAL / ENDLOCAL.
  17993.                     You cannot use SETLOCAL in an alias or at the command
  17994.                     line.
  17995.  
  17996.                     An ENDLOCAL is performed automatically at the end of a
  17997.                     batch file if you forget to do so.  If you invoke one
  17998.                     batch file from another without using CALL, the first
  17999.                     batch file is terminated, and an automatic ENDLOCAL is
  18000.                     performed.  The second batch file inherits the drive,
  18001.                     directory, aliases, and environment variables as they
  18002.                     were prior to any unterminated SETLOCAL.
  18003.  
  18004.              4DOS ! Do not load memory-resident programs (TSRs) from a
  18005.                     batch file while SETLOCAL is in effect.  If you do,
  18006.                     when ENDLOCAL is executed and the memory used by
  18007.                     SETLOCAL is released, a "hole" will be left in memory
  18008.                     below the TSR.  This is not usually harmful, but
  18009.                     wastes memory.
  18010.  
  18011.         -------------------------------------------------------------------
  18012.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 315
  18013.  
  18014.                                                                       SHIFT
  18015.         -------------------------------------------------------------------
  18016.  
  18017.         SHIFT                                                    (Enhanced)
  18018.  
  18019.         Purpose:    Allows the use of more than 127 batch file parameters
  18020.                     in a batch file.
  18021.  
  18022.         Format:     SHIFT [n]
  18023.  
  18024.                     n:           Number of positions to shift.
  18025.  
  18026.         Usage:      SHIFT is provided for compatibility with older batch
  18027.                     files, where it was used to access more than 10
  18028.                     parameters.  4DOS, 4OS2, and 4DOS/NT support 128
  18029.                     parameters (%0 to %127), so you may not need to use
  18030.                     SHIFT for batch files running exclusively under JP
  18031.                     Software command processors.
  18032.  
  18033.                     SHIFT moves each of the batch file parameters n
  18034.                     positions to the left.  The default value for n is 1.
  18035.                     SHIFT 1 moves the parameter in %1 to position %0, the
  18036.                     parameter in %2 becomes %1, etc.  You can reverse a
  18037.                     SHIFT by giving a negative value for n (i.e., after
  18038.                     SHIFT -1, the former %0 is restored, %0 becomes %1, %1
  18039.                     becomes %2, etc.).
  18040.  
  18041.                     SHIFT also affects the parameters %n& (command-line
  18042.                     tail; %n$ in 4OS2 and 4DOS/NT) and %# (number of
  18043.                     command arguments).
  18044.  
  18045.                     For example, create a batch file called TEST.BAT:
  18046.  
  18047.                          echo %1 %2 %3 %4
  18048.                          shift
  18049.                          echo %1 %2 %3 %4
  18050.                          shift 2
  18051.                          echo %1 %2 %3 %4
  18052.                          shift -1
  18053.                          echo %1 %2 %3 %4
  18054.  
  18055.                     Executing TEST.BAT produces the following results:
  18056.  
  18057.                          c:\> test one two three four five six seven
  18058.  
  18059.                          one two three four
  18060.                          two three four five
  18061.                          four five six seven
  18062.                          three four five six
  18063.  
  18064.  
  18065.  
  18066.  
  18067.         -------------------------------------------------------------------
  18068.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 316
  18069.  
  18070.                                                                       START
  18071.         -------------------------------------------------------------------
  18072.  
  18073.         START                                                         (New)
  18074.  
  18075.         Purpose:    Start a program in another session or window.
  18076.  
  18077.         Format:     The format for START depends on which command
  18078.                     processor you are using (see the Options section below
  18079.                     for additional minor differences in valid options
  18080.                     under 4DOS and 4OS2):
  18081.  
  18082.              4DOS   START ["program title"] [/B[G] /C /DOS[=optfile] /F[G]
  18083.              4OS2   /FS /ICON=iconfile /I /INV /K /L /LA /LH /MAX /MIN /N
  18084.                     /PGM progname /PM /POS=row,col,width,height /WAIT /WIN
  18085.                     /WIN3[=optfile] /WIN3S[=optfile]] [command]
  18086.  
  18087.              4NT    START ["program title"] [/B /C /Dpath /HIGH /I
  18088.                     /INV /K /L /LA /LH /LOW /MAX /MIN /NORMAL
  18089.                     /PGM progname /POS=row,col,width,height /REALTIME
  18090.                     /SIZE=rows,cols /WAIT] [command]
  18091.  
  18092.                     program title: Title to appear on title bar.
  18093.                     optfile:     Option settings file.
  18094.                     iconfile:    Name of icon (.ICO) file.
  18095.                     progname:    Program name (not the session name).
  18096.                     path:        Startup directory.
  18097.                     command:     Command to be executed.
  18098.  
  18099.                     /B (no new console)      /LOW (priority)
  18100.                     /B[G] (background)       /MAX(imized)
  18101.                     /C(lose when done)       /MIN(imized)
  18102.                     /D(irectory)             /N(o CMD.EXE)
  18103.                     /DOS (DOS session)       /NORMAL (priority)
  18104.                     /F[G] (foreground)       /PGM (program name)
  18105.                     /FS (full screen)        /PM (PM application)
  18106.                     /HIGH (priority)         /POS(ition of window)
  18107.                     /I(nherit environment)   /REALTIME (priority)
  18108.                     /ICON (name .ICO file)   /SIZE (of screen buffer)
  18109.                     /INV(isible)             /WAIT (for session to finish)
  18110.                     /K(eep when done)        /WIN(dowed session)
  18111.                     /L(ocal lists)           /WIN3 (Windows enhanced)
  18112.                     /LA (local aliases)      /WIN3S (Windows standard)
  18113.                     /LH (local history list)
  18114.  
  18115.                     See also:  DETACH.
  18116.  
  18117.         Usage:      START is used to begin a new OS/2 session or Windows
  18118.                     NT window and, optionally, to run a program in that
  18119.                     session or window.  If you use START with no
  18120.                     parameters, it will begin a new session or window.  If
  18121.  
  18122.  
  18123.         -------------------------------------------------------------------
  18124.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 317
  18125.  
  18126.                                                                       START
  18127.         -------------------------------------------------------------------
  18128.  
  18129.                     you add a command, START will begin a new session or
  18130.                     window and execute that command.
  18131.  
  18132.                     The program title, if it is included, will appear on
  18133.                     the title bar, on the Presentation Manager task list
  18134.                     (OS/2 version 1.x) or window list (OS/2 version 2.x),
  18135.                     or on the task list and Alt-Tab displays (Windows NT).
  18136.                     The program title must be enclosed in quotation marks
  18137.                     and cannot exceed 60 characters in 4OS2 and 4DOS, or
  18138.                     127 characters in 4DOS/NT.  If the program title is
  18139.                     omitted, the program name will be used as the title.
  18140.  
  18141.                     You can use START if you are running 4OS2, 4DOS/NT, or
  18142.                     4DOS in an OS/2 2.1 or later DOS session.  START will
  18143.                     not work when running 4DOS under DOS, or DOS plus
  18144.                     Windows.
  18145.  
  18146.                     Although the START command has the same purpose in
  18147.                     4DOS, 4OS2, and 4DOS/NT, there are several subtle
  18148.                     differences between platforms.  The 4DOS and 4OS2
  18149.                     versions of START are similar because both rely on the
  18150.                     services of the OS/2 operating system.  The 4DOS/NT
  18151.                     version of START has different options available,
  18152.                     partly to maintain compatibility with the START
  18153.                     command in the Windows NT version of CMD.EXE, and
  18154.                     partly because of the features of and limitations
  18155.                     imposed by Windows NT.
  18156.  
  18157.                     START offers a large number of switches to control the
  18158.                     session you start.  In most cases you need only a few
  18159.                     switches to accomplish what you want.  The list below
  18160.                     summarizes the most commonly used START options, and
  18161.                     how you can use them to control the way a session is
  18162.                     started:
  18163.  
  18164.                          /MAX,  /MIN, and /POS allow you to start a
  18165.                          character-mode windowed session in a maximized
  18166.                          window, a minimized window, or a window with a
  18167.                          specified position and size.  The default is to
  18168.                          let the operating environment choose the position
  18169.                          and size of the window.
  18170.  
  18171.                          /C allows you to close the session when the
  18172.                          command is finished (the default for DOS, OS/2
  18173.                          Presentation Manager, and Windows NT graphical
  18174.                          sessions); /K allows you to keep the session open
  18175.                          and go to a prompt (the default for OS/2 and
  18176.                          Windows NT character mode sessions).
  18177.  
  18178.  
  18179.         -------------------------------------------------------------------
  18180.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 318
  18181.  
  18182.                                                                       START
  18183.         -------------------------------------------------------------------
  18184.  
  18185.              4OS2,       /BG and /FG allow you to start the session in the
  18186.              4DOS        background (does not respond to keystrokes until
  18187.                          selected) or foreground (responds to keystrokes
  18188.                          until deselected).  /FG is the default if /DOS,
  18189.                          /FS, /WIN, or /PM is used; otherwise, /BG is the
  18190.                          default.
  18191.  
  18192.              4OS2,       /FS and /WIN control whether a character-mode
  18193.              4DOS        session is started in full-screen or windowed
  18194.                          mode.  The default is to start a session of the
  18195.                          same type as the current session, if the
  18196.                          application can be run in such a session.
  18197.  
  18198.              4OS2,  Under 4OS2 and 4DOS/NT, START determines the
  18199.              4NT    application type automatically and starts the session
  18200.                     in the appropriate mode:  OS/2, Windows, DOS, full-
  18201.                     screen, windowed, or Presentation Manager for OS/2;
  18202.                     DOS, 16-bit Windows, 32-bit Windows, 32-bit Windows NT
  18203.                     (both graphical and character mode), 16-bit OS/2 1.x
  18204.                     character mode, or POSIX for Windows NT.
  18205.  
  18206.                     START gives you some flexibility in determining the
  18207.                     session mode.  For example, if the command is the name
  18208.                     of a batch file (either a .BTM or .CMD file), you can
  18209.                     use the /FS or /WIN options to run the batch file as
  18210.                     part of a new 4OS2 session in either full-screen or
  18211.                     windowed mode.
  18212.  
  18213.                     However, you cannot start a session in a mode that is
  18214.                     inappropriate for the application type.  A DOS
  18215.                     application cannot be run as part of a Presentation
  18216.                     Manager session, for example, even if you use the /PM
  18217.                     switch.  Invalid or conflicting options will be
  18218.                     ignored.  4OS2 and 4DOS/NT will always attempt to run
  18219.                     the command in the appropriate type of session.
  18220.  
  18221.              4DOS   The 4DOS START command is unable to determine the
  18222.                     application type.  If you don't specify the type on
  18223.                     the command line, 4DOS will start a new OS/2 session
  18224.                     to run it.
  18225.  
  18226.              4OS2## If the program is a DOS application or .BAT file, 4OS2
  18227.                     will return an error message in OS/2 version 1.x.  In
  18228.                     OS/2 version 2.x, 4OS2 will start a new DOS session to
  18229.                     run the program or batch file.  The DOS session will
  18230.                     close itself automatically as soon as the program or
  18231.                     batch file ends, unless /K is used.  If you want the
  18232.                     session to wait for a keystroke before it closes
  18233.                     itself, you can use the syntax:
  18234.  
  18235.         -------------------------------------------------------------------
  18236.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 319
  18237.  
  18238.                                                                       START
  18239.         -------------------------------------------------------------------
  18240.  
  18241.                          [c:\] start /DOS command ^^ pause
  18242.  
  18243.                     (Because the caret [^] is the default 4OS2 escape
  18244.                     character, two carets must be used in order to pass
  18245.                     one on to 4DOS as a command separator.)
  18246.  
  18247.              4OS2,  If you want to start a DOS command-line session in
  18248.              4DOS   OS/2 version 2.x, you can use the command:
  18249.  
  18250.                          [c:\] start /DOS
  18251.  
  18252.           4OS2 ! ## Under OS/2, you can specify settings for DOS and
  18253.           4DOS      Windows sessions by using a settings options file, and
  18254.                     loading it with the /DOS=, /WIN3=, or /WIN3S= option.
  18255.                     This allows you to start DOS and Windows sessions with
  18256.                     specific settings without creating a desktop object
  18257.                     and modifying the settings manually.  Before using
  18258.                     this capability you should read the description of it
  18259.                     under /DOS= (below) very carefully, since errors in
  18260.                     the settings file can occasionally hang your system.
  18261.  
  18262.         Options:    Unlike most commands, the options below are not in
  18263.                     strictly alphabetical order.  Instead, they are
  18264.                     divided first by product, then alphabetically.
  18265.  
  18266.                     The following options are available in 4OS2, 4DOS/NT,
  18267.                     and 4DOS:
  18268.  
  18269.                          /C(lose):  The session or window is closed when
  18270.                          the application ends.
  18271.  
  18272.                          /INV(isible):  Start the session or window as
  18273.                          invisible.  No icon will appear and the session
  18274.                          will only be accessible through the Task Manager
  18275.                          or Window List.
  18276.  
  18277.                          /K(eep session or window at end):  The session or
  18278.                          window continues after the application program
  18279.                          ends.  Use the EXIT command to end the session.
  18280.  
  18281.                          /L(ocal lists):  Start the command processor with
  18282.                          local alias and history lists.  Under 4OS2 or
  18283.                          4DOS/NT, this option combines the effects of /LA
  18284.                          and /LH (below).
  18285.  
  18286.                          /LA (Local Alias list):  Start the command
  18287.                          processor with a local alias list.  See page 163
  18288.                          for information on local and global aliases.
  18289.  
  18290.  
  18291.         -------------------------------------------------------------------
  18292.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 320
  18293.  
  18294.                                                                       START
  18295.         -------------------------------------------------------------------
  18296.  
  18297.                          /LH (Local History list):  Start the command
  18298.                          processor with a local history list.  See page 38
  18299.                          for information on local and global history
  18300.                          lists.
  18301.  
  18302.                          /MAX(imized):  Start the session or window
  18303.                          maximized.
  18304.  
  18305.                          /MIN(imized):  Start the session or window
  18306.                          minimized.
  18307.  
  18308.                          /PGM (program name):  The string following this
  18309.                          option is the program name.  The first quoted
  18310.                          string on the line will be used as the session
  18311.                          and task list title, and not as the program name.
  18312.  
  18313.                          /POS(ition):  Start the window at the specified
  18314.                          screen position.  The syntax is /POS=row, col,
  18315.                          width, height where the values are specified in
  18316.                          pixels or pels.  Under 4DOS and 4OS2, row and col
  18317.                          refer to the position of the bottom left corner
  18318.                          of the window relative to the bottom left corner
  18319.                          of the screen.  Under 4DOS/NT, row and col refer
  18320.                          to the position of the top left corner of the
  18321.                          window relative to the top left corner of the
  18322.                          screen.
  18323.  
  18324.              4OS2,  The following options are available in 4OS2 and 4DOS,
  18325.              4DOS   but not in 4DOS/NT:
  18326.  
  18327.                          /BG (BackGround session):  The session is started
  18328.                          as a background session.  /BG may be abbreviated
  18329.                          to /B.
  18330.  
  18331.                          /DOS[=filename] (DOS session):  Start a DOS
  18332.                          session under OS/2 version 2.x.  This option is
  18333.                          not available in OS/2 version 1.x, which doesn't
  18334.                          allow multiple DOS sessions.
  18335.  
  18336.                          If you include the =filename, OS/2 will load DOS
  18337.                          settings from the specified file.  This option is
  18338.                          available only in the 32-bit version of 4OS2, and
  18339.                          in 4DOS.
  18340.  
  18341.                       !  Starting a session with specific DOS settings is
  18342.                          an undocumented feature which was implemented
  18343.                          within OS/2 with little error checking.  It is
  18344.                          included in START because it substantially eases
  18345.                          a complex task, but you must experiment carefully
  18346.  
  18347.         -------------------------------------------------------------------
  18348.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 321
  18349.  
  18350.                                                                       START
  18351.         -------------------------------------------------------------------
  18352.  
  18353.                          to ensure that the settings you select will work
  18354.                          properly on the systems on which you plan to use
  18355.                          them.  Incorrect settings may be ignored, but
  18356.                          they may also hang your session or stop the
  18357.                          entire system.  Be sure your experiments are not
  18358.                          conducted while critical tasks are in process.
  18359.  
  18360.                          Each line in the file must have a name, an equal
  18361.                          sign [=], and a value.  The names are those shown
  18362.                          in OS/2's DOS Settings dialog box.  Do not use
  18363.                          spaces on either side of the equal sign.
  18364.  
  18365.                          The names in the DOS Settings dialog box will
  18366.                          vary depending on the device drivers and other
  18367.                          settings in your CONFIG.SYS file, though many are
  18368.                          available on all systems.  You must ensure that
  18369.                          the names you use are valid for the systems on
  18370.                          which you use them.  For example, if you replace
  18371.                          IBM's COM.SYS and VCOM.SYS with different
  18372.                          communications drivers, the COM_ settings will
  18373.                          probably not be valid for the new drivers.  If
  18374.                          you have a settings file which contains settings
  18375.                          defined by a particular driver, and use it on a
  18376.                          system where the corresponding driver is not
  18377.                          loaded, the results are undefined.
  18378.  
  18379.                          The values in your settings file must be numeric
  18380.                          for settings which show a numeric value under DOS
  18381.                          Settings (e.g., DOS_FILES=30), and must be text
  18382.                          strings for settings shown with a string (e.g.,
  18383.                          DOS_SHELL=C:\4DOS.COM C:\4DOS /P).  Strings
  18384.                          should be entered without trailing blanks.  For
  18385.                          values shown as multiple choice on the DOS
  18386.                          Settings page you must specify a numeric value,
  18387.                          typically "0" for Off and 1 for On (e.g.,
  18388.                          DOS_HIGH=1).  Items with choices other than Off
  18389.                          and On may use different values, or may not work
  18390.                          at all; experimentation is usually required to
  18391.                          find out what works.  Attempting to use strings
  18392.                          for choice items (e.g., DOS_HIGH=ON) will not
  18393.                          work, and can hang your system.   This is due to
  18394.                          the internal operation of OS/2, and is not a
  18395.                          problem in 4OS2 or 4DOS.
  18396.  
  18397.                          A typical DOS settings file might look like this:
  18398.  
  18399.                               DOS_FILES=30
  18400.                               DOS_HIGH=1
  18401.                               DOS_SHELL=C:\4DOS\4DOS.COM C:\4DOS /P
  18402.  
  18403.         -------------------------------------------------------------------
  18404.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 322
  18405.  
  18406.                                                                       START
  18407.         -------------------------------------------------------------------
  18408.  
  18409.                               MOUSE_EXCLUSIVE_ACCESS=0
  18410.                               VIDEO_FASTPASTE=1
  18411.  
  18412.                          You can include comments in a settings file by
  18413.                          beginning any line with a colon [:].
  18414.  
  18415.                          /FG (ForeGround session):  Start the session as
  18416.                          the foreground session.  /FG may be abbreviated
  18417.                          to /F.
  18418.  
  18419.                          /FS (Full Screen):  Start the session as a full-
  18420.                          screen session.
  18421.  
  18422.                          /ICON=filename:  Use the specified icon file.  If
  18423.                          you don't use /ICON, 4OS2 or 4DOS will look for
  18424.                          an .ICO file with the same file name and in the
  18425.                          same directory as the program file.  Some
  18426.                          versions of OS/2 may ignore this option and use
  18427.                          the default icon for the session.  If you
  18428.                          encounter this problem, check whether an update
  18429.                          to OS/2 has been released which addresses it.
  18430.  
  18431.                          /N:  Under 4OS2, start an OS/2 program directly,
  18432.                          without a command processor.  The command cannot
  18433.                          be an internal command or batch file.  This is
  18434.                          the default for PM applications.  Under 4DOS,
  18435.                          start a DOS program directly.
  18436.  
  18437.                          /PM (Presentation Manager):  Start a program in
  18438.                          the PM session.
  18439.  
  18440.                          /WIN(dowed):  Start the session in a window.
  18441.  
  18442.                          /WIN3[=filename] (Windows enhanced mode):  Run
  18443.                          the program in an enhanced-mode Windows 3.x
  18444.                          session.  The session will run seamless (on the
  18445.                          OS/2 desktop) if started from 4OS2, or full-
  18446.                          screen if started from 4DOS.  (To start a Windows
  18447.                          application in full-screen mode from 4OS2, use
  18448.                          /FS rather than /WIN3).  You can include an equal
  18449.                          sign and the name of an options file to set
  18450.                          options for the specific session and application
  18451.                          (see /DOS= above for details).  The setting names
  18452.                          in the file should be taken from those shown in
  18453.                          OS/2's WIN-OS/2 Settings dialog box.  Available
  18454.                          only in the 32-bit version of 4OS2, and in 4DOS.
  18455.  
  18456.                          /WIN3S[=filename] (Windows standard mode):
  18457.                          Equivalent to /WIN3, but runs the program in
  18458.  
  18459.         -------------------------------------------------------------------
  18460.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 323
  18461.  
  18462.                                                                       START
  18463.         -------------------------------------------------------------------
  18464.  
  18465.                          standard mode rather than enhanced mode.
  18466.                          Available only in 4OS2/32 and 4DOS.
  18467.  
  18468.              4OS2,  The following options are available in 4OS2 and
  18469.              4NT    4DOS/NT, but cannot be used under 4DOS:
  18470.  
  18471.                          /I(nherit environment):  Inherit the default
  18472.                          environment specified in CONFIG.SYS, if any,
  18473.                          rather than the current environment.
  18474.  
  18475.                          /WAIT:  Wait for the new session or window to
  18476.                          finish before continuing.  Cannot be used with
  18477.                          /WIN3 or /WIN3S.
  18478.  
  18479.              4NT    The final group of options is only available under
  18480.                     4DOS/NT:
  18481.  
  18482.                          /B (no new console):  The program is started
  18483.                          without creating a new window or console.
  18484.  
  18485.                          /D(irectory):  Specifies the startup directory.
  18486.                          Include the directory immediately after the /D,
  18487.                          with no intervening spaces or punctuation.
  18488.  
  18489.                          /HIGH:  Start the window at high priority.
  18490.  
  18491.                          /LOW:  Start the window at low priority.
  18492.  
  18493.                          /NORMAL:  Start the window at normal priority.
  18494.  
  18495.                          /REALTIME:  Start the window at realtime
  18496.                          priority.
  18497.  
  18498.                          /SIZE:  Specify the screen buffer size.  The full
  18499.                          syntax is /SIZE=rows, columns.
  18500.  
  18501.  
  18502.  
  18503.  
  18504.  
  18505.  
  18506.  
  18507.  
  18508.  
  18509.  
  18510.  
  18511.  
  18512.  
  18513.  
  18514.  
  18515.         -------------------------------------------------------------------
  18516.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 324
  18517.  
  18518.                                                         [4DOS]     SWAPPING
  18519.         -------------------------------------------------------------------
  18520.  
  18521.         SWAPPING     [4DOS]                                           (New)
  18522.  
  18523.         Purpose:    Enable or disable 4DOS swapping, or display the
  18524.                     swapping state.
  18525.  
  18526.         Format:     SWAPPING [ON | OFF]
  18527.  
  18528.         ##  Usage:  SWAPPING temporarily disables or enables the swapping
  18529.                     of the transient portion of 4DOS to expanded memory,
  18530.                     to XMS extended memory, or to disk (see page 128).
  18531.  
  18532.                     Setting SWAPPING OFF is particularly useful for
  18533.                     speeding up batch files (including AUTOEXEC.BAT) when
  18534.                     4DOS is using disk swapping.  When you are running
  18535.                     several small programs from a batch file, disk
  18536.                     swapping can sometimes cause a noticeable delay.
  18537.                     However, if you disable swapping, there will be about
  18538.                     128K less memory available for large application
  18539.                     programs.
  18540.  
  18541.                     The following batch file fragment disables swapping,
  18542.                     runs several programs, and then re-enables swapping:
  18543.  
  18544.                          swapping off
  18545.                          c:\util\mouse
  18546.                          c:\video\ansi.com
  18547.                          cls bright white on blue
  18548.                          c:\bin\cache.com
  18549.                          swapping on
  18550.  
  18551.                     If you enter SWAPPING with no arguments, 4DOS displays
  18552.                     the current swapping type (XMS, EMS, Disk, or None)
  18553.                     and state:
  18554.  
  18555.                          c:\> swapping
  18556.                          SWAPPING (XMS) is ON
  18557.  
  18558.                     Setting SWAPPING OFF does not close the disk swap file
  18559.                     or release any reserved EMS or XMS memory.
  18560.  
  18561.                     You may have trouble if you load memory-resident
  18562.                     programs (TSRs) with SWAPPING OFF and unload them with
  18563.                     SWAPPING ON, or vice versa.  Many TSRs expect the
  18564.                     system to be in the same state when they unload that
  18565.                     it was in when they loaded, and variation from this
  18566.                     norm may cause the TSR to unload improperly or hang
  18567.                     your system.
  18568.  
  18569.  
  18570.  
  18571.         -------------------------------------------------------------------
  18572.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 325
  18573.  
  18574.                                                                         TEE
  18575.         -------------------------------------------------------------------
  18576.  
  18577.         TEE                                                           (New)
  18578.  
  18579.         Purpose:    Copy standard input to both standard output and a
  18580.                     file.
  18581.  
  18582.         Format:     TEE [/A] file...
  18583.  
  18584.                     file:        One or more files that will receive the
  18585.                                  "tee-d" output.
  18586.  
  18587.                     /A(ppend)
  18588.  
  18589.                     See also:  Y, and the redirection options (page 50).
  18590.  
  18591.         ##  Usage:  TEE is normally used to "split" the output of a
  18592.                     program so that you can see it on the display and also
  18593.                     save it in a file.  It can also be used to capture
  18594.                     intermediate output before the data is altered by
  18595.                     another program or command.
  18596.  
  18597.                     TEE gets its input from standard input (usually the
  18598.                     piped output of another command or program), and sends
  18599.                     out two copies:  one goes to standard output, the
  18600.                     other to the file or files that you specify.  TEE is
  18601.                     not likely to be useful with programs which do not use
  18602.                     standard output, because these programs cannot send
  18603.                     output through a pipe.  See page 53 for more
  18604.                     information on pipes.
  18605.  
  18606.                     For example, to search the file DOC for any lines
  18607.                     containing the string "4DOS", make a copy of the
  18608.                     matching lines in 4.DAT, sort the lines, and write
  18609.                     them to the output file 4D.DAT:
  18610.  
  18611.                          c:\> find "4DOS" doc | tee 4.dat | sort > 4d.dat
  18612.  
  18613.                     If you are typing at the keyboard to produce the input
  18614.                     for TEE, you must enter a Ctrl-Z to terminate the
  18615.                     input.
  18616.  
  18617.              4DOS   When using TEE with a pipe under 4DOS, the previous
  18618.                     command writes its output to a temporary file.  When
  18619.                     that command finishes, TEE begins operation and can
  18620.                     read the temporary file, display the output, and write
  18621.                     it to the file(s) named in the TEE command.
  18622.  
  18623.  
  18624.  
  18625.  
  18626.  
  18627.         -------------------------------------------------------------------
  18628.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 326
  18629.  
  18630.                                                                         TEE
  18631.         -------------------------------------------------------------------
  18632.  
  18633.              4OS2,  When using TEE with a pipe under 4OS2 or 4DOS/NT, the
  18634.              4NT    programs on the two ends of the pipe run
  18635.                     simultaneously, not sequentially as in 4DOS.  See page
  18636.                     54 for more information.
  18637.  
  18638.         Option:     /A(ppend):  Append the output to the file(s) rather
  18639.                     than overwriting them.
  18640.  
  18641.  
  18642.  
  18643.  
  18644.  
  18645.  
  18646.  
  18647.  
  18648.  
  18649.  
  18650.  
  18651.  
  18652.  
  18653.  
  18654.  
  18655.  
  18656.  
  18657.  
  18658.  
  18659.  
  18660.  
  18661.  
  18662.  
  18663.  
  18664.  
  18665.  
  18666.  
  18667.  
  18668.  
  18669.  
  18670.  
  18671.  
  18672.  
  18673.  
  18674.  
  18675.  
  18676.  
  18677.  
  18678.  
  18679.  
  18680.  
  18681.  
  18682.  
  18683.         -------------------------------------------------------------------
  18684.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 327
  18685.  
  18686.                                                                        TEXT
  18687.         -------------------------------------------------------------------
  18688.  
  18689.         TEXT                                                          (New)
  18690.  
  18691.         Purpose:    Display a block of text in a batch file.
  18692.  
  18693.         Format:     TEXT
  18694.                          .
  18695.                          .
  18696.                          .
  18697.                     ENDTEXT
  18698.  
  18699.                     See also:  ECHO, SCREEN, SCRPUT, and VSCRPUT.
  18700.  
  18701.         Usage:      TEXT can only be used in batch files.
  18702.  
  18703.                     The TEXT command is useful for displaying menus or
  18704.                     multi-line messages.  TEXT will display all subsequent
  18705.                     lines in the batch file until terminated by ENDTEXT.
  18706.                     Both TEXT and ENDTEXT must be entered as the only
  18707.                     command on the line.
  18708.  
  18709.                     To redirect the entire block of text, use redirection
  18710.                     on the TEXT command itself, but not on the actual text
  18711.                     lines or the ENDTEXT line.  No environment variable
  18712.                     expansion or other processing is performed on the
  18713.                     lines between TEXT and ENDTEXT; they are displayed
  18714.                     exactly as they are stored in the batch file.
  18715.  
  18716.              4DOS,  If you are running 4OS2, or 4DOS with an ANSI driver
  18717.              4OS2   loaded, you can change screen colors by inserting ANSI
  18718.                     escape sequences anywhere in the text block.  This
  18719.                     will not work in 4DOS/NT, because Windows NT does not
  18720.                     provide ANSI support.  You can also use a CLS or COLOR
  18721.                     command in 4DOS, 4OS2, or 4DOS/NT to set the screen
  18722.                     color before executing the TEXT command.
  18723.  
  18724.                     The following batch file fragment displays a simple
  18725.                     menu:
  18726.  
  18727.                          @echo off
  18728.                          cls
  18729.                          screen 2 0
  18730.                          text
  18731.                          Enter one of the following:
  18732.                          1 - Spreadsheet
  18733.                          2 - Word Processing
  18734.                          3 - DOS Utilities
  18735.                          Enter your selection :
  18736.                          endtext
  18737.  
  18738.  
  18739.         -------------------------------------------------------------------
  18740.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 328
  18741.  
  18742.                                                                        TIME
  18743.         -------------------------------------------------------------------
  18744.  
  18745.         TIME                                                   (Compatible)
  18746.  
  18747.         Purpose:    Display or set the current system time.
  18748.  
  18749.         Format:     TIME [hh[:mm[:ss]]] [AM | PM]
  18750.  
  18751.                     hh:          The hour (0 - 23).
  18752.                     mm:          The minute (0 - 59).
  18753.                     ss:          The second (0 - 59).
  18754.  
  18755.                     See also:    CHCP and DATE
  18756.  
  18757.         Usage:      If you don't enter any parameters, TIME will display
  18758.                     the current system time and prompt you for a new time.
  18759.                     Press Enter if you don't wish to change the time;
  18760.                     otherwise, enter the new time:
  18761.  
  18762.                          c:\> time
  18763.                          Wed  Dec 22, 1993  9:30:10
  18764.                          New time (hh:mm:ss):
  18765.  
  18766.                     TIME defaults to 24-hour format, but you can
  18767.                     optionally enter the time in 12-hour format by
  18768.                     appending "a", "am", "p", or "pm" to the time you
  18769.                     enter.
  18770.  
  18771.                     For example, to enter the time as 9:30 am:
  18772.  
  18773.                          c:\> time 9:30 am
  18774.  
  18775.                     The operating system adds the system time and date to
  18776.                     the directory entry for every file you create or
  18777.                     modify.  If you keep both the time and date accurate,
  18778.                     you will have a record of when you last updated each
  18779.                     file.
  18780.  
  18781.  
  18782.  
  18783.  
  18784.  
  18785.  
  18786.  
  18787.  
  18788.  
  18789.  
  18790.  
  18791.  
  18792.  
  18793.  
  18794.  
  18795.         -------------------------------------------------------------------
  18796.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 329
  18797.  
  18798.                                                                       TIMER
  18799.         -------------------------------------------------------------------
  18800.  
  18801.         TIMER                                                         (New)
  18802.  
  18803.         Purpose:    TIMER is a system stopwatch.
  18804.  
  18805.         Format:     TIMER [ON] [/1 /2 /3 /S]
  18806.  
  18807.                     ON:          Force the stopwatch to restart
  18808.  
  18809.                     /1 (stopwatch #1)        /3 (stopwatch #3)
  18810.                     /2 (stopwatch #2)        /S(plit)
  18811.  
  18812.         Usage:      The TIMER command turns a system stopwatch on and off.
  18813.                     When you first run TIMER, the stopwatch starts:
  18814.  
  18815.                          c:\> timer
  18816.                          Timer 1 on:  12:21:46
  18817.  
  18818.                     When you run TIMER again, the stopwatch stops and the
  18819.                     elapsed time is displayed:
  18820.  
  18821.                          c:\> timer
  18822.                          Timer 1 off:  12:21:58   Elapsed time: 0:00:12.06
  18823.  
  18824.                     There are three stopwatches available (1, 2, and 3) so
  18825.                     you can time multiple overlapping events.  By default,
  18826.                     TIMER uses stopwatch #1.
  18827.  
  18828.                     TIMER is particularly useful for timing events in
  18829.                     batch files.  For example, to time both an entire
  18830.                     batch file, and an intermediate section of the same
  18831.                     file, you could use commands like this:
  18832.  
  18833.                          rem Turn on timer 1
  18834.                          timer
  18835.                          rem Do some work here
  18836.                          rem Turn timer 2 on to time the next section
  18837.                          timer /2
  18838.                          rem Do some more work
  18839.                          echo Intermediate section completed
  18840.                          rem Display time taken in intermediate section
  18841.                          timer /2
  18842.                          rem Do some more work
  18843.                          rem Now display the total time
  18844.                          timer
  18845.  
  18846.                     The smallest interval TIMER can measure depends on the
  18847.                     operating system you are using, your hardware, and the
  18848.                     interaction between the two.  However, it should never
  18849.  
  18850.  
  18851.         -------------------------------------------------------------------
  18852.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 330
  18853.  
  18854.                                                                       TIMER
  18855.         -------------------------------------------------------------------
  18856.  
  18857.                     be greater than .06 second.  The largest interval is
  18858.                     23 hours, 59 minutes, 59.99 seconds.
  18859.  
  18860.         Options:    /1:  Use timer #1 (the default).
  18861.  
  18862.                     /2:  Use timer #2.
  18863.  
  18864.                     /3:  Use timer #3.
  18865.  
  18866.                     /S(plit):  Display a split time without stopping the
  18867.                     timer.  To display the current elapsed time but leave
  18868.                     the timer running:
  18869.  
  18870.                          c:\> timer /s
  18871.                          Timer 1 elapsed: 0:06:40.63
  18872.  
  18873.                     ON:  Start the timer regardless of its previous state
  18874.                     (on or off).  Otherwise the TIMER command toggles the
  18875.                     timer state (unless /S is used).
  18876.  
  18877.  
  18878.  
  18879.  
  18880.  
  18881.  
  18882.  
  18883.  
  18884.  
  18885.  
  18886.  
  18887.  
  18888.  
  18889.  
  18890.  
  18891.  
  18892.  
  18893.  
  18894.  
  18895.  
  18896.  
  18897.  
  18898.  
  18899.  
  18900.  
  18901.  
  18902.  
  18903.  
  18904.  
  18905.  
  18906.  
  18907.         -------------------------------------------------------------------
  18908.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 331
  18909.  
  18910.                                                         [4DOS/NT]     TITLE
  18911.         -------------------------------------------------------------------
  18912.  
  18913.         TITLE        [4DOS/NT]                                 (Compatible)
  18914.  
  18915.         Purpose:    Change the window title.
  18916.  
  18917.         Format:     TITLE "title"
  18918.  
  18919.                     title:       The new window title
  18920.  
  18921.                     See also:  ACTIVATE and WINDOW.
  18922.  
  18923.         Usage:      TITLE changes the text that appears in the caption bar
  18924.                     at the top of the 4DOS/NT window.  It is included only
  18925.                     for compatibility with CMD.EXE.  You can also change
  18926.                     the window title with the WINDOW command or the
  18927.                     ACTIVATE command.
  18928.  
  18929.                     The title text must be enclosed in double quotes.  The
  18930.                     quotes will not appear as part of the actual title.
  18931.  
  18932.                     To change the title of the current window to "4DOS for
  18933.                     Windows NT":
  18934.  
  18935.                          [c:\] title "4DOS for Windows NT"
  18936.  
  18937.  
  18938.  
  18939.  
  18940.  
  18941.  
  18942.  
  18943.  
  18944.  
  18945.  
  18946.  
  18947.  
  18948.  
  18949.  
  18950.  
  18951.  
  18952.  
  18953.  
  18954.  
  18955.  
  18956.  
  18957.  
  18958.  
  18959.  
  18960.  
  18961.  
  18962.  
  18963.         -------------------------------------------------------------------
  18964.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 332
  18965.  
  18966.                                                         [4DOS]     TRUENAME
  18967.         -------------------------------------------------------------------
  18968.  
  18969.         TRUENAME     [4DOS]                                           (New)
  18970.  
  18971.         Purpose:    Find the full, true path and file name for a file.
  18972.  
  18973.         Format:     TRUENAME file
  18974.  
  18975.                     file:        The file whose name TRUENAME will report.
  18976.  
  18977.                     See also:  @TRUENAME variable function on page 114.
  18978.  
  18979.         Usage:      Default directories, as well as the JOIN and SUBST
  18980.                     external commands, can obscure the true name of a
  18981.                     file.  TRUENAME "sees through" these obstacles and
  18982.                     reports the fully qualified name of a file.
  18983.  
  18984.                     The following example uses TRUENAME to get the true
  18985.                     pathname for a file:
  18986.  
  18987.                          c:\> subst d: c:\util\test
  18988.                          c:\> truename d:\test.exe
  18989.                          c:\util\test\test.exe
  18990.  
  18991.                     TRUENAME requires MS-DOS or PC-DOS 3.0 or above,
  18992.                     DR DOS or Novell DOS 6.0 or above, or OS/2 version 2.0
  18993.                     or above.
  18994.  
  18995.                     TRUENAME can handle simple drive substitutions such as
  18996.                     those created by JOIN, SUBST, or most network drive
  18997.                     mappings.  However it may not be able to correctly
  18998.                     determine the true name if you use "nested" JOIN or
  18999.                     SUBST commands, or a network which does not report
  19000.                     true names properly.
  19001.  
  19002.  
  19003.  
  19004.  
  19005.  
  19006.  
  19007.  
  19008.  
  19009.  
  19010.  
  19011.  
  19012.  
  19013.  
  19014.  
  19015.  
  19016.  
  19017.  
  19018.  
  19019.         -------------------------------------------------------------------
  19020.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 333
  19021.  
  19022.                                                                        TYPE
  19023.         -------------------------------------------------------------------
  19024.  
  19025.         TYPE                                                     (Enhanced)
  19026.  
  19027.         Purpose:    Display the contents of the specified file(s).
  19028.  
  19029.         Format:     TYPE [/L /P] file...
  19030.  
  19031.                     file:        The file or list of files that you want to
  19032.                                  display.
  19033.  
  19034.                     /L(ine numbers)          /P(ause)
  19035.  
  19036.                     See also:  LIST.
  19037.  
  19038.         File Select:Supports extended wildcards, ranges, multiple file
  19039.                     names, and include lists (see pages 57 - 65).
  19040.  
  19041.         Usage:      The TYPE command displays a file.  It is normally only
  19042.                     useful for displaying ASCII text files.  Executable
  19043.                     files (.COM and .EXE) and many data files may be
  19044.                     unreadable when displayed with TYPE because they
  19045.                     include non-alphanumeric characters.
  19046.  
  19047.                     To display the files MEMO1 and MEMO2:
  19048.  
  19049.                          c:\> type /p memo1 memo2
  19050.  
  19051.                     You can press Ctrl-S to pause TYPE's display and then
  19052.                     any key to continue.
  19053.  
  19054.                     You will probably find LIST to be more useful for
  19055.                     displaying files.  However, the TYPE /L command used
  19056.                     with redirection (see page 50) is useful if you want
  19057.                     to add line numbers to a file.
  19058.  
  19059.         Options:    /L(ine numbers):  Display a line number preceding each
  19060.                     line of text.
  19061.  
  19062.                     /P(ause):  Prompt after displaying each page.  Your
  19063.                     options at the prompt are explained in detail on page
  19064.                     48.
  19065.  
  19066.  
  19067.  
  19068.  
  19069.  
  19070.  
  19071.  
  19072.  
  19073.  
  19074.  
  19075.         -------------------------------------------------------------------
  19076.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 334
  19077.  
  19078.                                                                     UNALIAS
  19079.         -------------------------------------------------------------------
  19080.  
  19081.         UNALIAS                                                       (New)
  19082.  
  19083.         Purpose:    Remove aliases from the alias list.
  19084.  
  19085.         Format:     UNALIAS [/Q] alias...
  19086.                          or
  19087.                     UNALIAS *
  19088.  
  19089.                     alias:       One or more aliases to remove from memory.
  19090.  
  19091.                     /Q(uiet)
  19092.  
  19093.                     See also:  ALIAS and ESET.
  19094.  
  19095.         Usage:      4DOS, 4OS2, and 4DOS/NT maintain a list of the aliases
  19096.                     that you have defined.  The UNALIAS command will
  19097.                     remove aliases from that list.  You can remove one or
  19098.                     more aliases by name, or you can delete the entire
  19099.                     alias list by using the command UNALIAS *.
  19100.  
  19101.                     For example, to remove the alias DDIR:
  19102.  
  19103.                          c:\> unalias ddir
  19104.  
  19105.                     To remove all the aliases:
  19106.  
  19107.                          c:\> unalias *
  19108.  
  19109.         Options:    /Q(uiet):  Prevents UNALIAS from displaying an error
  19110.                     message if one or more of the aliases does not exist.
  19111.                     This option is most useful in batch files, for
  19112.                     removing a group of aliases when some of the aliases
  19113.                     may not have been defined.
  19114.  
  19115.  
  19116.  
  19117.  
  19118.  
  19119.  
  19120.  
  19121.  
  19122.  
  19123.  
  19124.  
  19125.  
  19126.  
  19127.  
  19128.  
  19129.  
  19130.  
  19131.         -------------------------------------------------------------------
  19132.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 335
  19133.  
  19134.                                                                       UNSET
  19135.         -------------------------------------------------------------------
  19136.  
  19137.         UNSET                                                         (New)
  19138.  
  19139.         Purpose:    Remove variables from the environment.
  19140.  
  19141.         Format:     UNSET  [/M /Q] name...
  19142.                          or
  19143.                     UNSET *
  19144.  
  19145.                     name:        One or more variables to remove from the
  19146.                                  environment.
  19147.  
  19148.                     /M(aster environment)            /Q(uiet)
  19149.  
  19150.                     See also:  ESET and SET.
  19151.  
  19152.         Usage:      UNSET removes one or more variables from the
  19153.                     environment.  For example, to remove the variable
  19154.                     CMDLINE:
  19155.  
  19156.                          c:\> unset cmdline
  19157.  
  19158.                     If you use the command UNSET *, all of the environment
  19159.                     variables will be deleted:
  19160.  
  19161.                          c:\> unset *
  19162.  
  19163.                     UNSET is often used in conjunction with the SETLOCAL
  19164.                     and ENDLOCAL commands in order to clear the
  19165.                     environment of variables that may cause problems for
  19166.                     some applications.
  19167.  
  19168.                     For more information on environment variables, see the
  19169.                     SET command and the general discussions on pages 21
  19170.                     and 94.
  19171.  
  19172.                  !  Use caution when removing environment variables, and
  19173.                     especially when using UNSET *.  Many programs will not
  19174.                     work properly without certain environment variables;
  19175.                     for example, 4DOS depends on PATH and COMSPEC, and
  19176.                     4OS2 uses PATH and DPATH.
  19177.  
  19178.         Options: ## /M(aster):  Remove the variable from the master
  19179.              4DOS   environment rather than the local environment.  This
  19180.                     option only makes sense if used in a secondary shell.
  19181.  
  19182.                     /Q(uiet):  Prevents UNSET from displaying an error
  19183.                     message if one or more of the variables does not
  19184.                     exist.  This option is most useful in batch files, for
  19185.  
  19186.  
  19187.         -------------------------------------------------------------------
  19188.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 336
  19189.  
  19190.                                                                       UNSET
  19191.         -------------------------------------------------------------------
  19192.  
  19193.                     removing a group of variables when some of the
  19194.                     variables may not have been defined.
  19195.  
  19196.  
  19197.  
  19198.  
  19199.  
  19200.  
  19201.  
  19202.  
  19203.  
  19204.  
  19205.  
  19206.  
  19207.  
  19208.  
  19209.  
  19210.  
  19211.  
  19212.  
  19213.  
  19214.  
  19215.  
  19216.  
  19217.  
  19218.  
  19219.  
  19220.  
  19221.  
  19222.  
  19223.  
  19224.  
  19225.  
  19226.  
  19227.  
  19228.  
  19229.  
  19230.  
  19231.  
  19232.  
  19233.  
  19234.  
  19235.  
  19236.  
  19237.  
  19238.  
  19239.  
  19240.  
  19241.  
  19242.  
  19243.         -------------------------------------------------------------------
  19244.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 337
  19245.  
  19246.                                                                         VER
  19247.         -------------------------------------------------------------------
  19248.  
  19249.         VER                                                      (Enhanced)
  19250.  
  19251.         Purpose:    Display the current command processor and operating
  19252.                     system versions.
  19253.  
  19254.         Format:     VER [/R]
  19255.  
  19256.                     /R(evision level)
  19257.  
  19258.         Usage:      Version numbers consist of a one-digit major version
  19259.                     number, a period, and a one- or two-digit minor
  19260.                     version number.  The VER command displays both version
  19261.                     numbers:
  19262.  
  19263.                          c:\> ver
  19264.  
  19265.                          4DOS 5.0   DOS 6.0
  19266.  
  19267.              4DOS   4DOS's VER command will automatically detect OS/2 and
  19268.                     DR DOS or Novell DOS and display the corresponding
  19269.                     operating system name and version number.  For
  19270.                     example:
  19271.  
  19272.                          c:\> ver
  19273.  
  19274.                          4DOS 5.0   OS/2 2.1
  19275.  
  19276.         Option:     /R(evision level):  Display the command processor and
  19277.                     operating system internal revision level (if any),
  19278.                     plus your 4DOS, 4OS2, or 4DOS/NT serial number and
  19279.                     registered name.
  19280.  
  19281.                     Under 4DOS, /R also displays whether DOS is loaded
  19282.                     into the high memory area (HMA), is resident in ROM,
  19283.                     or is in normal base memory.  This output is only
  19284.                     meaningful in MS-DOS or PC-DOS version 5.0 or above or
  19285.                     in an OS/2 2.x DOS session.
  19286.  
  19287.  
  19288.  
  19289.  
  19290.  
  19291.  
  19292.  
  19293.  
  19294.  
  19295.  
  19296.  
  19297.  
  19298.  
  19299.         -------------------------------------------------------------------
  19300.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 338
  19301.  
  19302.                                                                      VERIFY
  19303.         -------------------------------------------------------------------
  19304.  
  19305.         VERIFY                                                 (Compatible)
  19306.  
  19307.         Purpose:    Enable or disable disk write verification or display
  19308.                     the verification state.
  19309.  
  19310.         Format:     VERIFY [ON | OFF]
  19311.  
  19312.         Usage:      DOS and OS/2 maintain an internal verify flag.  When
  19313.                     the flag is on, the operating system attempts to
  19314.                     verify each disk write by making sure that the data
  19315.                     written to the disk can be read back successfully into
  19316.                     the computer.  It does not compare the data written
  19317.                     with the data actually placed on disk.
  19318.  
  19319.              4NT    Disk write verification cannot actually be enabled or
  19320.                     disabled under Windows NT.  4DOS/NT supports VERIFY as
  19321.                     a "do-nothing" command, for compatibility with
  19322.                     CMD.EXE.  This avoids "unknown command" errors in
  19323.                     batch files which use the VERIFY command.  The
  19324.                     additional discussion below applies only to 4DOS and
  19325.                     4OS2, and not to 4DOS/NT.
  19326.  
  19327.                     If used without any parameters, VERIFY will display
  19328.                     the state of the verify flag:
  19329.  
  19330.                          c:\> verify
  19331.                          VERIFY is OFF
  19332.  
  19333.                     VERIFY is off when the system boots up.  Once it is
  19334.                     turned on with the VERIFY ON command, it stays on
  19335.                     until you use the VERIFY OFF command or until you
  19336.                     reboot.
  19337.  
  19338.                     Verification will slow your disk write operations
  19339.                     slightly (the effect is not usually noticeable).
  19340.  
  19341.  
  19342.  
  19343.  
  19344.  
  19345.  
  19346.  
  19347.  
  19348.  
  19349.  
  19350.  
  19351.  
  19352.  
  19353.  
  19354.  
  19355.         -------------------------------------------------------------------
  19356.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 339
  19357.  
  19358.                                                                         VOL
  19359.         -------------------------------------------------------------------
  19360.  
  19361.         VOL                                                      (Enhanced)
  19362.  
  19363.         Purpose:    Display disk volume label(s).
  19364.  
  19365.         Format:     VOL [d:] ...
  19366.  
  19367.                     d:           The drive or drives to search for labels.
  19368.  
  19369.         Usage:      Each disk may have a volume label, created when the
  19370.                     disk is formatted or with the external LABEL command.
  19371.                     Also, every floppy disk formatted with DOS version 4.0
  19372.                     or above, OS/2, or Windows NT has a volume serial
  19373.                     number.
  19374.  
  19375.                     The VOL command will display the volume label and, if
  19376.                     available, the volume serial number of a disk volume.
  19377.                     If the disk doesn't have a volume label, VOL will
  19378.                     report that it is "unlabeled."  If you don't specify a
  19379.                     drive, VOL displays information about the current
  19380.                     drive:
  19381.  
  19382.                          c:\> vol
  19383.                          Volume in drive C: is MYHARDDISK
  19384.  
  19385.                     If available, the volume serial number will appear
  19386.                     after the drive label or name.
  19387.  
  19388.                     To display the disk labels for drives A and B:
  19389.  
  19390.                          c:\> vol a: b:
  19391.                          Volume in drive A: is unlabeled
  19392.                          Volume in drive B: is BACKUP_2
  19393.  
  19394.  
  19395.  
  19396.  
  19397.  
  19398.  
  19399.  
  19400.  
  19401.  
  19402.  
  19403.  
  19404.  
  19405.  
  19406.  
  19407.  
  19408.  
  19409.  
  19410.  
  19411.         -------------------------------------------------------------------
  19412.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 340
  19413.  
  19414.                                                                     VSCRPUT
  19415.         -------------------------------------------------------------------
  19416.  
  19417.         VSCRPUT                                                       (New)
  19418.  
  19419.         Purpose:    Display text vertically in the specified color.
  19420.  
  19421.         Format:     VSCRPUT  row col [BRIght] [BLInk] fg ON [BRIght] bg
  19422.                          text
  19423.  
  19424.                     row:         Starting row number.
  19425.                     col:         Starting column number.
  19426.                     fg:          Foreground text color.
  19427.                     bg:          Background text color.
  19428.                     text:        The text to display.
  19429.  
  19430.                     See also:  SCRPUT.
  19431.  
  19432.         Usage:      VSCRPUT writes text vertically on the screen rather
  19433.                     than horizontally.  Like the SCRPUT command, it uses
  19434.                     the colors you specify to write the text.  VSCRPUT can
  19435.                     be used for simple graphs and charts generated by
  19436.                     batch files.  It always leaves the cursor in its
  19437.                     current position.  See page 26 for details about
  19438.                     colors and color names, and notes on the use of bright
  19439.                     background colors.
  19440.  
  19441.                     The row and column are zero-based, so on a standard 25
  19442.                     line by 80 column display, valid rows are 0 - 24 and
  19443.                     valid columns are 0 - 79.  You can also specify the
  19444.                     row and column as offsets from the current cursor
  19445.                     position.  Begin the value with a plus sign [+] to
  19446.                     move down the specified number of rows or to the right
  19447.                     the specified number of columns before displaying
  19448.                     text, or with a minus sign [-] to move up or to the
  19449.                     left.
  19450.  
  19451.                     The following batch file fragment displays an X and Y
  19452.                     axis and labels them:
  19453.  
  19454.                          cls bright white on blue
  19455.                          drawhline 20 10 40 1 bright white on blue
  19456.                          drawvline 2 10 19 1 bright white on blue
  19457.                          scrput 21 20 bright red on blue X axis
  19458.                          vscrput 8 9 bright red on blue Y axis
  19459.  
  19460.                     VSCRPUT checks for a valid row and column, and
  19461.                     displays a "Usage" error message if either value is
  19462.                     out of range.
  19463.  
  19464.              4DOS## VSCRPUT normally writes text directly to the screen.
  19465.                     If you have an unusual display adapter which does not
  19466.  
  19467.         -------------------------------------------------------------------
  19468.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 341
  19469.  
  19470.                                                                     VSCRPUT
  19471.         -------------------------------------------------------------------
  19472.  
  19473.                     support direct video output, see the OutputBIOS
  19474.                     directive on page 143.
  19475.  
  19476.  
  19477.  
  19478.  
  19479.  
  19480.  
  19481.  
  19482.  
  19483.  
  19484.  
  19485.  
  19486.  
  19487.  
  19488.  
  19489.  
  19490.  
  19491.  
  19492.  
  19493.  
  19494.  
  19495.  
  19496.  
  19497.  
  19498.  
  19499.  
  19500.  
  19501.  
  19502.  
  19503.  
  19504.  
  19505.  
  19506.  
  19507.  
  19508.  
  19509.  
  19510.  
  19511.  
  19512.  
  19513.  
  19514.  
  19515.  
  19516.  
  19517.  
  19518.  
  19519.  
  19520.  
  19521.  
  19522.  
  19523.         -------------------------------------------------------------------
  19524.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 342
  19525.  
  19526.                                                  [4OS2, 4DOS/NT]     WINDOW
  19527.         -------------------------------------------------------------------
  19528.  
  19529.         WINDOW       [4OS2, 4DOS/NT]                                  (New)
  19530.  
  19531.         Purpose:    Minimize or maximize the current window, restore the
  19532.                     default window size, or change the window title.
  19533.  
  19534.         Format:     WINDOW [MIN | MAX | RESTORE]
  19535.                          [/POS=row,col,width, height] ["title"]
  19536.  
  19537.                     title:       A new title for the window.
  19538.  
  19539.                     /POS(ition)
  19540.  
  19541.                     See also:  ACTIVATE and TITLE.
  19542.  
  19543.         Usage:      WINDOW is used to control the appearance and title of
  19544.                     the current window.  WINDOW MIN reduces the window to
  19545.                     an icon, WINDOW MAX enlarges it to its maximum size,
  19546.                     and WINDOW RESTORE returns the window to its default
  19547.                     size and location on the desktop.
  19548.  
  19549.                     You can use the /POS option to set the location and
  19550.                     size of the window on the desktop.  The row and column
  19551.                     values of the /POS option select the window's origin
  19552.                     while the width and height values determine its size.
  19553.  
  19554.                     If you specify a new title, the title text must be
  19555.                     enclosed in double quotes.  The quotes will not appear
  19556.                     as part of the actual title.
  19557.  
  19558.         Options:    /POS(ition):  Set the window screen position and size.
  19559.                     The syntax is /POS=row, col, width, height where the
  19560.                     values are specified in pixels or pels.  Under 4OS2,
  19561.                     row and col refer to the position of the bottom left
  19562.                     corner of the window relative to the bottom left
  19563.                     corner of the screen.  Under 4DOS/NT, row and col
  19564.                     refer to the position of the top left corner of the
  19565.                     window relative to the top left corner of the screen.
  19566.  
  19567.  
  19568.  
  19569.  
  19570.  
  19571.  
  19572.  
  19573.  
  19574.  
  19575.  
  19576.  
  19577.  
  19578.  
  19579.         -------------------------------------------------------------------
  19580.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 343
  19581.  
  19582.                                                                           Y
  19583.         -------------------------------------------------------------------
  19584.  
  19585.         Y                                                             (New)
  19586.  
  19587.         Purpose:    Copy standard input to standard output, and then copy
  19588.                     the specified file(s) to standard output.
  19589.  
  19590.         Format:     Y file ...
  19591.  
  19592.                     file:        The file or list of files to send to
  19593.                                  standard output.
  19594.  
  19595.                     See also:  TEE.
  19596.  
  19597.         ##  Usage:  The Y command copies input from standard input
  19598.                     (usually the keyboard) to standard output (usually the
  19599.                     screen).  Once the input ends, the named files are
  19600.                     appended to standard output.
  19601.  
  19602.                     For example, to get text from standard input, append
  19603.                     the files MEMO1 and MEMO2 to it, and send the output
  19604.                     to MEMOS:
  19605.  
  19606.                          c:\> y memo1 memo2 > memos
  19607.  
  19608.                     The Y command is most useful if you want to add
  19609.                     redirected data to the beginning of a file instead of
  19610.                     appending it to the end.  For example, this command
  19611.                     copies the output of DIR, followed by the contents of
  19612.                     the file DIREND, to the file DIRALL:
  19613.  
  19614.                          c:\> dir | y dirend > dirall
  19615.  
  19616.                     If you are typing at the keyboard to produce input
  19617.                     text for Y, you must enter a Ctrl-Z to terminate the
  19618.                     input.
  19619.  
  19620.                  !  When using Y with a pipe under 4OS2 or 4DOS/NT, you
  19621.                     must take into account that the programs on the two
  19622.                     ends of the pipe run simultaneously, not sequentially.
  19623.                     See page 54 for more information.
  19624.  
  19625.  
  19626.  
  19627.  
  19628.  
  19629.  
  19630.  
  19631.  
  19632.  
  19633.  
  19634.  
  19635.         -------------------------------------------------------------------
  19636.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 344
  19637.  
  19638.                                                 APPENDIX A / ERROR MESSAGES
  19639.         -------------------------------------------------------------------
  19640.  
  19641.  
  19642.         APPENDIX A / ERROR MESSAGES
  19643.  
  19644.  
  19645.         This appendix lists error messages generated by 4DOS, 4OS2, and
  19646.         4DOS/NT, and includes a recommended course of action for most
  19647.         errors.  If you are unable to resolve the problem, look through
  19648.         your Introduction and Installation Guide for any additional
  19649.         troubleshooting recommendations, then contact JP Software for
  19650.         technical support (see page 7).
  19651.  
  19652.         Error messages relating to files are generally reports of errors
  19653.         returned by the operating system.  You may find some of these
  19654.         messages (for example, "Access denied") vague enough that they are
  19655.         not always helpful.  4DOS, 4OS2, and 4DOS/NT include the file name
  19656.         in file error messages, but are often unable to determine a more
  19657.         accurate explanation of these errors.  The message shown is the
  19658.         best information available based on the error codes returned by the
  19659.         operating system.
  19660.  
  19661.         For some errors you are instructed to "restart the session or
  19662.         reboot the system."  This means that you should attempt to correct
  19663.         the error by closing and restarting the current session under OS/2,
  19664.         Windows NT, or a DOS task switcher or multitasker (including
  19665.         Windows).  Under DOS without a multitasker or task switcher, you
  19666.         will probably have to reboot the system to correct the problem.
  19667.  
  19668.         The following list includes all error messages, in alphabetical
  19669.         order:
  19670.  
  19671.      4DOS    4DOS internal stack overflow:  You attempted to nest batch
  19672.              files or commands like DO, EXCEPT, FOR, IF, IFF, GLOBAL, or
  19673.              SELECT too deep, and 4DOS ran out of stack space.  Restructure
  19674.              your command, alias, or batch file, or use the StackSize
  19675.              directive in 4DOS.INI to increase 4DOS's internal stack size.
  19676.  
  19677.      4DOS    4DOS initialization error --:  An error occurred during the
  19678.              4DOS startup process.  Look up the rest of the message in this
  19679.              list for a more specific explanation.
  19680.  
  19681.      4DOS    4DOS server error --:  An error occurred in communication
  19682.              between 4DOS's resident and transient portions.  A more
  19683.              specific error message follows.
  19684.  
  19685.      4DOS    4DOS swapping failed, loading in non-swapping mode:  None of
  19686.              the swapping options worked, so 4DOS loaded in non-swapping
  19687.              mode, which requires about 128K more memory than swapping
  19688.              mode.  Check your Swapping specification in 4DOS.INI, and/or
  19689.              free some XMS or EMS memory or disk space.
  19690.  
  19691.         -------------------------------------------------------------------
  19692.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 345
  19693.  
  19694.                                                 APPENDIX A / ERROR MESSAGES
  19695.         -------------------------------------------------------------------
  19696.  
  19697.      4DOS    4DOS unrecoverable error XX:  An error occurred in the
  19698.              resident portion of 4DOS.  These errors will terminate
  19699.              secondary shells and, and may require you to reboot the system
  19700.              or restart the session if they occur during a primary shell or
  19701.              if 4DOS cannot continue.  The error codes are:
  19702.  
  19703.                   BI     Bad function code.  Contact JP Software.
  19704.                   DI     Same as Disk swap file corrupted.
  19705.                   DR     Same as Swap file read error.
  19706.                   DS     Same as Swap file seek error.
  19707.                   EI     Same as EMS mapping error.
  19708.                   NS     No number for new shell.  You have started too
  19709.                          many 4DOS secondary shells without properly
  19710.                          exiting some of them, perhaps by closing DESQview
  19711.                          windows rather than EXITing.  Clean up any work
  19712.                          in process and reboot the system or restart the
  19713.                          session.
  19714.                   PT     Illegal process termination.  Contact JP
  19715.                          Software.
  19716.                   TS     Terminated inactive shell.  Contact JP Software.
  19717.                   XI     Same as XMS move failed.
  19718.  
  19719.              Access denied:  You tried to write to or erase a read-only
  19720.              file, rename a file or directory to an existing name, create a
  19721.              directory that already exists, remove a read-only directory or
  19722.              a directory with files or subdirectories still in it, or
  19723.              access a file in use by another program in a multitasking
  19724.              system.
  19725.  
  19726.      4DOS    Address table missing:  Your 4DOS.COM file is invalid.  If you
  19727.              used an executable file compression program on 4DOS.COM, the
  19728.              compression may not be compatible with 4DOS.  Re-install
  19729.              4DOS.COM from diskette, or download a new copy.
  19730.  
  19731.              Alias loop:  An alias refers back to itself either directly or
  19732.              indirectly (i.e., a = b = a), or aliases are nested more than
  19733.              16 deep.  Correct your alias list.
  19734.  
  19735.      4DOS    Attempt to exit from root shell:  Another program has probably
  19736.              destroyed a portion of 4DOS's memory.  Reboot the system or
  19737.              restart the session; if the error persists, contact JP
  19738.              Software.
  19739.  
  19740.              Bad disk unit:  Generally caused by a disk drive hardware
  19741.              failure.
  19742.  
  19743.      4DOS    Bad environment:  The DOS environment has a bad structure,
  19744.              probably because a program destroyed 4DOS's master environment
  19745.              space.  Reboot the system or restart the session.
  19746.  
  19747.         -------------------------------------------------------------------
  19748.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 346
  19749.  
  19750.                                                 APPENDIX A / ERROR MESSAGES
  19751.         -------------------------------------------------------------------
  19752.  
  19753.              Batch file missing:  4DOS, 4OS2, or 4DOS/NT can't find the
  19754.              batch (.BAT or .CMD) file it was running.  It was either
  19755.              deleted, renamed, moved, or the disk was changed.  Correct the
  19756.              problem and rerun the file.
  19757.  
  19758.              Can't copy file to itself:  You cannot COPY or MOVE a file to
  19759.              itself.  4DOS, 4OS2, and 4DOS/NT perform full path and
  19760.              filename expansion before copying to ensure that files aren't
  19761.              inadvertently destroyed.
  19762.  
  19763.              Can't create:  The command processor can't create the
  19764.              specified file.  The disk may be full or write protected, or
  19765.              the file already exists and is read-only, or the root
  19766.              directory is full.
  19767.  
  19768.              Can't delete:  The command processor can't delete the
  19769.              specified file or directory.  The disk is probably write
  19770.              protected.
  19771.  
  19772.              Can't get directory:  The command processor can't read the
  19773.              directory.  The disk drive is probably not ready.
  19774.  
  19775.              Can't make directory entry:  The command processor can't
  19776.              create the filename in the directory.  This is usually caused
  19777.              by a full root directory.  Create a subdirectory and move some
  19778.              of the files to it.
  19779.  
  19780.              Can't open:  The command processor can't open the specified
  19781.              file.  Either the file doesn't exist or the disk directory or
  19782.              File Allocation Table is damaged.
  19783.  
  19784.              Can't remove current directory:  You attempted to remove the
  19785.              current directory, which the operating system does not allow.
  19786.              Change to the parent directory and try again.
  19787.  
  19788.      4DOS    Can't set up disk swap file:  The disk swap file you specified
  19789.              cannot be opened.  The path or drive is invalid, the disk is
  19790.              full, DOS is out of file handles, or there is a hardware
  19791.              problem.  Check 4DOS.INI to be sure your Swapping directive is
  19792.              correct.
  19793.  
  19794.              Command line too long:  A single command exceeded 255
  19795.              characters in 4DOS or 1023 characters in 4OS2 or 4DOS/NT, or
  19796.              the entire command line exceeded 511 characters in 4DOS, or
  19797.              2047 characters in 4OS2 or 4DOS/NT, during alias and variable
  19798.              expansion.  Reduce the complexity of the command or use a
  19799.              batch file.  Also check for an alias which refers back to
  19800.              itself either directly or indirectly.
  19801.  
  19802.  
  19803.         -------------------------------------------------------------------
  19804.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 347
  19805.  
  19806.                                                 APPENDIX A / ERROR MESSAGES
  19807.         -------------------------------------------------------------------
  19808.  
  19809.              Command only valid in batch file:  You have tried to use a
  19810.              batch file command, like DO or GOSUB, from the command line or
  19811.              in an alias.  A few commands can only be used in batch files
  19812.              (see the individual commands for details).
  19813.  
  19814.      4DOS    Command tail too long, truncated:  A program attempted to pass
  19815.              a command in an improper format or a command longer than 126
  19816.              characters to a 4DOS secondary shell.  This is probably a bug
  19817.              in the program from which 4DOS was loaded.  Contact the author
  19818.              of the program or JP Software for technical assistance.
  19819.  
  19820.              Contents lost before copy:  COPY was appending files, and
  19821.              found one of the source files is the same as the target.  That
  19822.              source file is skipped, and appending continues with the next
  19823.              file.
  19824.  
  19825.              Data error:  The operating system can't read or write properly
  19826.              to the device.  On a floppy drive, this error is usually
  19827.              caused by a defective floppy disk, dirty disk drive heads, or
  19828.              a misalignment between the heads on your drive and the drive
  19829.              on which the disk was created.  On a hard drive, this error
  19830.              may indicate a drive that is too hot or too cold, or a
  19831.              hardware problem.  Retry the operation; if it fails again,
  19832.              correct the hardware or diskette problem.
  19833.  
  19834.              Directory stack empty:  POPD or DIRS can't find any entries in
  19835.              the directory stack.
  19836.  
  19837.              Disk is write protected:  The disk cannot be written to.
  19838.              Check the disk and remove the write-protect tab or close the
  19839.              write-protect window if necessary.
  19840.  
  19841.      4DOS    Disk swap file corrupted:  The 4DOS disk swapping file
  19842.              (4DOSSWAP.nnn or xxxxxxxx.4SW) has been moved, deleted, or
  19843.              damaged by another program.  Reboot the system or restart the
  19844.              session.
  19845.  
  19846.              Drive not ready -- close door:  The floppy disk drive door is
  19847.              open.  Close the door and try again.
  19848.  
  19849.      4DOS    EMS deallocation failed:  4DOS can't deallocate EMS memory
  19850.              when exiting from a secondary shell.  The EMS map has been
  19851.              corrupted or the memory area used by 4DOS or the EMS driver
  19852.              has been destroyed by a program.  Clean up any work in process
  19853.              and reboot the system or restart the session.
  19854.  
  19855.      4DOS    EMS map save or restore failed:  4DOS cannot save or restore
  19856.              the EMS page map.  The EMS map has been corrupted, memory has
  19857.              been destroyed by a program, or you have an incompatible EMS
  19858.  
  19859.         -------------------------------------------------------------------
  19860.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 348
  19861.  
  19862.                                                 APPENDIX A / ERROR MESSAGES
  19863.         -------------------------------------------------------------------
  19864.  
  19865.              driver.  If this error recurs, try another swapping method,
  19866.              update your EMS driver, or contact JP Software.
  19867.  
  19868.      4DOS    EMS mapping failed:  4DOS can't map EMS pages when swapping to
  19869.              or from EMS.  The EMS map has been corrupted or the memory
  19870.              area used by the loader or the EMS driver has been destroyed
  19871.              by a program.  Reboot the system or restart the session.
  19872.  
  19873.              Environment already saved:  You have already saved the
  19874.              environment with a previous SETLOCAL command.  You cannot nest
  19875.              SETLOCAL / ENDLOCAL pairs.
  19876.  
  19877.              Error in command-line directive:  You used the //iniline
  19878.              option to place an .INI directive on the startup command line,
  19879.              or, under 4DOS, on the SHELL= line in CONFIG.SYS, but the
  19880.              directive is in error.  A more specific error message follows.
  19881.  
  19882.              Error on line [nnnn] of [filename]:  There is an error in your
  19883.              .INI file.  The following message explains the error in more
  19884.              detail.  Correct the line in error and restart the command
  19885.              processor for your change to take effect.
  19886.  
  19887.              Error reading:  The operating system experienced an I/O error
  19888.              when reading from a device.  This is usually caused by a bad
  19889.              disk, a device not ready, or a hardware error.
  19890.  
  19891.              Error writing:  The operating system experienced an I/O error
  19892.              when writing to a device.  This is usually caused by a full
  19893.              disk, a bad disk, a device not ready, or a hardware error.
  19894.  
  19895.              Exceeded batch nesting limit:  You have attempted to nest
  19896.              batch files more than 10 levels deep.
  19897.  
  19898.      4DOS    Fatal error -- please reboot:  4DOS cannot continue due to the
  19899.              previous error.  Reboot the system or restart the session.
  19900.  
  19901.              File Allocation Table bad:  The operating system  can't access
  19902.              the FAT on the specified disk.  This can be caused by a bad
  19903.              disk, a hardware error, or an unusual software interaction.
  19904.  
  19905.              File exists:  The requested output file already exists, and
  19906.              the command processor won't overwrite it.
  19907.  
  19908.              File is empty:  You attempted to LIST a file with no data (a
  19909.              zero-byte file).
  19910.  
  19911.              File not found:  4DOS, 4OS2, or 4DOS/NT couldn't find the
  19912.              specified file.  Check the spelling and path name.
  19913.  
  19914.  
  19915.         -------------------------------------------------------------------
  19916.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 349
  19917.  
  19918.                                                 APPENDIX A / ERROR MESSAGES
  19919.         -------------------------------------------------------------------
  19920.  
  19921.              General failure:  This is usually a hardware problem,
  19922.              particularly a disk drive failure or a device not properly
  19923.              connected to a serial or parallel port.  Try to correct the
  19924.              problem, or reboot and try again.  Also see Data error above;
  19925.              the problems described there can sometimes cause a general
  19926.              failure rather than a data error.
  19927.  
  19928.      4DOS    I/O error in [filename], some directives may not have been
  19929.              processed:  An I/O error occurred while reading your 4DOS.INI
  19930.              file.  There may be a physical problem with data on the disk
  19931.              or a sharing error on a multitasking system.  Check your
  19932.              4DOS.INI file and try again.
  19933.  
  19934.              Infinite COPY or MOVE loop:  You tried to COPY or MOVE a
  19935.              directory to one of its own subdirectories and used the /S
  19936.              switch, so the command would run forever.  Correct the command
  19937.              and try again.
  19938.  
  19939.              Insufficient disk space:  COPY or MOVE ran out of room on the
  19940.              destination drive.  Remove some files and retry the operation.
  19941.  
  19942.      4DOS    Insufficient load space:  There is not enough room in 4DOS's
  19943.              internal memory areas to include all of the options you
  19944.              requested in 4DOS.INI.  Contact JP Software for assistance.
  19945.  
  19946.      4DOS    Internal DOS error:  DOS encountered an internal bug and
  19947.              failed. Reboot the system.
  19948.  
  19949.      4DOS    Invalid AUTOEXEC filename:  You specified an invalid path or
  19950.              filename for the AUTOEXEC file with the /P: startup switch, or
  19951.              with the DOS_AUTOEXEC setting in an OS/2 DOS session.  The
  19952.              default name will be used instead.  Correct the filename, then
  19953.              reboot the system or restart the session.
  19954.  
  19955.              Invalid character value:  You gave an invalid value for a
  19956.              character directive in the .INI file.
  19957.  
  19958.              Invalid choice value:  You gave an invalid value for a
  19959.              "choice" directive (one that accepts a choice from a list,
  19960.              like "Yes" or "No") in the .INI file.
  19961.  
  19962.              Invalid color:  You gave an invalid value for a color
  19963.              directive in the .INI file.
  19964.  
  19965.              Invalid date:  An invalid date was entered.  Check the syntax
  19966.              and reenter.
  19967.  
  19968.              Invalid directive name:  4DOS, 4OS2, or 4DOS/NT can't
  19969.              recognize the name of a directive in your .INI file.
  19970.  
  19971.         -------------------------------------------------------------------
  19972.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 350
  19973.  
  19974.                                                 APPENDIX A / ERROR MESSAGES
  19975.         -------------------------------------------------------------------
  19976.  
  19977.      4DOS    Invalid DOS version:  You need a newer version of DOS to
  19978.              execute the specified command.
  19979.  
  19980.              Invalid drive:  A bad or non-existent disk drive was
  19981.              specified.
  19982.  
  19983.      4DOS    Invalid INI file path or name, file not processed:  The path
  19984.              or name for the initialization file on the SHELL= line in
  19985.              CONFIG.SYS, or on the startup command line, is invalid.
  19986.              Correct the @d:\path\inifile option to name the correct file.
  19987.  
  19988.              Invalid key name:  You tried to make an invalid key
  19989.              substitution in the .INI file, or you used an invalid key name
  19990.              in a keystroke alias or command.  Correct the error and retry
  19991.              the operation.
  19992.  
  19993.              Invalid numeric [or character] value:  You gave an invalid
  19994.              value for a numeric directive in the .INI file, or for a
  19995.              character directive in 4DOS.INI.
  19996.  
  19997.              Invalid parameter:  The command processor didn't recognize a
  19998.              parameter.  Check the syntax and spelling of the command you
  19999.              entered.
  20000.  
  20001.              Invalid path:  The specified path does not exist.  Check the
  20002.              disk specification and/or spelling.
  20003.  
  20004.              Invalid path or file name:  You used an invalid path or
  20005.              filename in a directive in the .INI file.
  20006.  
  20007.      4DOS    Invalid startup switch, ignored:  You passed 4DOS an invalid
  20008.              option on the SHELL= line in CONFIG.SYS or on the startup
  20009.              command line for a secondary shell.  Correct the switch.
  20010.  
  20011.      4DOS    Invalid Swapping option or path:  The swap type or disk swap
  20012.              path in the 4DOS.INI Swapping directive is invalid.  4DOS
  20013.              ignores the bad swap type or path and attempts to scan the
  20014.              rest of the Swapping specification for a valid option.
  20015.              Multiple errors in the Swapping directive will cause this
  20016.              message to repeat.  Correct 4DOS.INI and reboot the system or
  20017.              restart the session.
  20018.  
  20019.              Invalid time:  An invalid time was entered.  Check the syntax
  20020.              and reenter.
  20021.  
  20022.              Keystroke substitution table full:  4DOS, 4OS2, or 4DOS/NT ran
  20023.              out of room to store keystroke substitutions entered in the
  20024.              .INI file.  Reduce the number of key substitutions or contact
  20025.              JP Software for assistance.
  20026.  
  20027.         -------------------------------------------------------------------
  20028.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 351
  20029.  
  20030.                                                 APPENDIX A / ERROR MESSAGES
  20031.         -------------------------------------------------------------------
  20032.  
  20033.      4DOS    KSTACK.COM not loaded:  You attempted to execute a KEYSTACK
  20034.              command without loading KSTACK.COM.  See the KEYSTACK command
  20035.              for more information.
  20036.  
  20037.              Label not found:  A GOTO or GOSUB referred to a non-existent
  20038.              label. Check your batch file.
  20039.  
  20040.      4DOS    Memory [allocation | deallocation] error:  4DOS can't allocate
  20041.              or deallocate memory while loading, or while reserving or
  20042.              releasing memory for internal use.  DOS memory allocation has
  20043.              been corrupted, or another application has reserved memory
  20044.              incorrectly.  Reboot the system or restart the session.
  20045.  
  20046.      4DOS    Memory destroyed:  The DOS memory control blocks have been
  20047.              corrupted.  Reboot the system or restart the session.
  20048.  
  20049.              Missing ENDTEXT:  A TEXT command is missing a matching
  20050.              ENDTEXT.  Check the batch file.
  20051.  
  20052.              Missing GOSUB:  The command processor cannot perform the
  20053.              RETURN command in a batch file.  You tried to do a RETURN
  20054.              without a GOSUB, or your batch file has been corrupted.
  20055.  
  20056.              Missing SETLOCAL:  An ENDLOCAL was used without a matching
  20057.              SETLOCAL.
  20058.  
  20059.              No aliases defined:  You tried to display aliases but no
  20060.              aliases have been defined.
  20061.  
  20062.              No closing quote:  4DOS, 4OS2, or 4DOS/NT couldn't find a
  20063.              second matching back-quote [`] or double-quote ["] on the
  20064.              command line.
  20065.  
  20066.              No expression:  The expression passed to the %@EVAL variable
  20067.              function is empty.  Correct the expression and retry the
  20068.              operation.
  20069.  
  20070.      4DOS    No file handle available:  This is an internal 4DOS disk
  20071.              swapping error.  Change to another swapping method if
  20072.              possible, and contact JP Software.
  20073.  
  20074.              No room for INI file name:  4DOS, 4OS2, or 4DOS/NT does not
  20075.              have enough space to pass the name of your .INI file to
  20076.              secondary shells; see String area overflow for more details.
  20077.              Any [Secondary] section in 4DOS.INI will be ignored in
  20078.              secondary shells until the problem is corrected and the system
  20079.              or session is restarted.
  20080.  
  20081.  
  20082.  
  20083.         -------------------------------------------------------------------
  20084.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 352
  20085.  
  20086.                                                 APPENDIX A / ERROR MESSAGES
  20087.         -------------------------------------------------------------------
  20088.  
  20089.      4DOS    No UMBs; loading low:  The LOADHIGH (or LH) command can't find
  20090.              any UMBs for your program.  The program is loaded into base
  20091.              memory.  LH and LOADHIGH only work with MS-DOS 5.0 and above,
  20092.              when the DOS=UMB directive is included in CONFIG.SYS and
  20093.              sufficient upper memory space is available for the program.
  20094.  
  20095.      4DOS    No upper memory available, low memory will be used for
  20096.              [resident portion | master environment | global aliases |
  20097.              global history]:  You asked 4DOS to load the block of memory
  20098.              named in the message into a UMB via the corresponding
  20099.              directive in 4DOS.INI (UMBLoad, UMBEnvironment, etc.), but no
  20100.              UMB was available.  Check that your XMS driver is properly
  20101.              installed and/or free up some UMB space in use by another
  20102.              program.
  20103.  
  20104.      4DOS    Non-DOS disk:  DOS can't read the disk.  Either the disk is
  20105.              bad, or it has been formatted by a different operating system.
  20106.              Reformat it as a DOS disk.  Also see Data error above; the
  20107.              problems described there can sometimes cause a non-DOS disk
  20108.              error rather than a data error.
  20109.  
  20110.              Not an alias:  The specified alias is not in the alias list.
  20111.  
  20112.              Not in environment:  The specified variable is not in the
  20113.              environment.
  20114.  
  20115.      4DOS    Not in swapping mode:  You attempted to turn swapping on or
  20116.              off with the SWAPPING command, but 4DOS is loaded in non-
  20117.              swapping mode.
  20118.  
  20119.              Not ready:  The specified device can't be accessed.
  20120.  
  20121.              Not same device:  This error usually appears in RENAME.  You
  20122.              cannot rename a file to a different disk drive.
  20123.  
  20124.      4DOS    Out of environment/alias space:  4DOS has run out of space for
  20125.              environment variables or aliases.  Edit the SHELL line in
  20126.              CONFIG.SYS or the Environment directive in 4DOS.INI to
  20127.              increase the environment size, or the Alias directive in
  20128.              4DOS.INI to increase the alias list size.
  20129.  
  20130.              Out of memory:  The command processor or the operating system
  20131.              had insufficient memory to execute the last command, or under
  20132.              DOS, the memory control blocks have been destroyed.  If this
  20133.              error occurs in a 4DOS secondary shell, return to the primary
  20134.              shell before running the command.  Otherwise, try to free some
  20135.              memory by removing memory-resident programs (under DOS), or
  20136.              closing other sessions (under OS/2 and Windows NT).  If the
  20137.              error persists, contact JP Software for assistance.
  20138.  
  20139.         -------------------------------------------------------------------
  20140.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 353
  20141.  
  20142.                                                 APPENDIX A / ERROR MESSAGES
  20143.         -------------------------------------------------------------------
  20144.  
  20145.      4DOS    Under 4DOS, if the base memory (DOS RAM) figures reported by
  20146.              MEMORY are unreasonable, the memory control blocks have
  20147.              probably been destroyed and you must reboot the system or
  20148.              restart the session.  If you receive this error from DIR when
  20149.              MEMORY shows sufficient memory for the directory you are
  20150.              displaying, memory has probably been "fragmented," and
  20151.              contains a free area larger than 8K but not large enough for
  20152.              the entire directory.  Use a memory mapping program like PMAP,
  20153.              MAPMEM, or the DOS MEM utility to locate the fragmentation,
  20154.              and experiment with your TSRs and applications to determine
  20155.              and remove its cause.
  20156.  
  20157.              Out of paper:  The operating system detected an out-of-paper
  20158.              condition on one of the printers (LPT1, LPT2, or LPT3).  Check
  20159.              your printer and add paper if necessary.
  20160.  
  20161.              Overflow:  An arithmetic overflow occurred in the %@EVAL
  20162.              variable function.  Check the values being passed to %@EVAL.
  20163.              %@EVAL can handle 16 digits to the left of the decimal point
  20164.              and 8 to the right.
  20165.  
  20166.              Read error:  The operating system encountered a disk read
  20167.              error; usually caused by a bad or unformatted disk.
  20168.  
  20169.      4DOS    Region unavailable, using first available region for [resident
  20170.              portion | master environment | global aliases | global
  20171.              history]:  You used a 4DOS.INI directive to load the block of
  20172.              memory named in the message into a specific UMB region, but
  20173.              that region was unavailable.  Check the use of upper memory
  20174.              for device drivers and other programs loaded before 4DOS,
  20175.              and/or change the requested region number.
  20176.  
  20177.              Sector not found:  BIOS disk error, usually caused by a bad or
  20178.              unformatted disk.
  20179.  
  20180.              Seek error:  The operating system can't seek to the proper
  20181.              location on the disk.  This is generally caused by a bad disk
  20182.              or drive.
  20183.  
  20184.              Sharing violation:  You tried to access a file in use by
  20185.              another program in a multitasking system or on a network.
  20186.              Wait for the file to become available, or change your method
  20187.              of operation so that another program does not have the file
  20188.              open while you are trying to use it.
  20189.  
  20190.              String area overflow:  The command processor ran out of room
  20191.              to store the text from string directives in the .INI file.
  20192.              Reduce the complexity of the .INI file or contact JP Software
  20193.              for assistance.
  20194.  
  20195.         -------------------------------------------------------------------
  20196.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 354
  20197.  
  20198.                                                 APPENDIX A / ERROR MESSAGES
  20199.         -------------------------------------------------------------------
  20200.  
  20201.      4DOS    Swap file [seek | read | write] failed:  4DOS encountered an
  20202.              I/O error while accessing the disk swap file (4DOSSWAP.nnn or
  20203.              xxxxxxx.4SW).  The disk was changed, the file has been
  20204.              destroyed by a program, or 4DOS's memory area has been
  20205.              overwritten by another program.  Reboot the system or restart
  20206.              the session.
  20207.  
  20208.              Syntax error:  A command or variable function was entered in
  20209.              an improper format.  Check the syntax and correct the error.
  20210.  
  20211.      4DOS    Syntax error in region number or size:  You specified an
  20212.              invalid region number or size in the LH or LOADHIGH command.
  20213.              Correct the command.
  20214.  
  20215.      4DOS    Too many DR DOS SETs in CONFIG.SYS:  The SET commands in your
  20216.              DR DOS or Novell DOS CONFIG.SYS file exceeded the size of
  20217.              4DOS's buffer area.  Reduce the length of the commands or
  20218.              contact JP Software for assistance.
  20219.  
  20220.      4DOS,   Too many open files:  DOS or OS/2 has run out of file handles.
  20221.      4OS2    Try increasing the FILES setting in CONFIG.SYS.
  20222.  
  20223.      4DOS    Transient memory [allocation | deallocation] error:  4DOS
  20224.              could not reserve or release memory for its transient portion
  20225.              (probably in a SWAPPING OFF or SWAPPING ON command).  The
  20226.              memory control blocks have been destroyed, or a program has
  20227.              fragmented memory.  Reboot the system or restart the session.
  20228.  
  20229.              Unbalanced parentheses:  The number of left and right
  20230.              parentheses did not match in an expression passed to the
  20231.              %@EVAL variable function.  Correct the expression and retry
  20232.              the operation.
  20233.  
  20234.              Unknown command:  A command was entered that 4DOS, 4OS2, or
  20235.              4DOS/NT didn't recognize and couldn't find in the current
  20236.              search path.  Check the spelling or PATH specification.  You
  20237.              can handle unknown commands with the UNKNOWN_CMD alias (see
  20238.              page 165).
  20239.  
  20240.              Variable loop:  A nested environment variable refers to
  20241.              itself, or variables are nested more than 16 deep.  Correct
  20242.              the error and retry the command.
  20243.  
  20244.      4OS2,   Window title not found:  The ACTIVATE or WINDOW command cannot
  20245.      4NT     find a window with the title you specified.  Correct the
  20246.              command and try again.
  20247.  
  20248.              Write error:  The operating system encountered a disk write
  20249.              error; usually caused by a bad or unformatted disk.
  20250.  
  20251.         -------------------------------------------------------------------
  20252.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 355
  20253.  
  20254.                                                 APPENDIX A / ERROR MESSAGES
  20255.         -------------------------------------------------------------------
  20256.  
  20257.      4DOS    XMS deallocation failed:  4DOS could not deallocate XMS memory
  20258.              when exiting a secondary shell.  XMS memory has been
  20259.              destroyed; reboot the system or restart the session.
  20260.  
  20261.      4DOS    XMS move failed:  4DOS could not move data between base memory
  20262.              and XMS memory while swapping itself.  XMS memory has been
  20263.              destroyed; reboot the system or restart the session.
  20264.  
  20265.  
  20266.  
  20267.  
  20268.  
  20269.  
  20270.  
  20271.  
  20272.  
  20273.  
  20274.  
  20275.  
  20276.  
  20277.  
  20278.  
  20279.  
  20280.  
  20281.  
  20282.  
  20283.  
  20284.  
  20285.  
  20286.  
  20287.  
  20288.  
  20289.  
  20290.  
  20291.  
  20292.  
  20293.  
  20294.  
  20295.  
  20296.  
  20297.  
  20298.  
  20299.  
  20300.  
  20301.  
  20302.  
  20303.  
  20304.  
  20305.  
  20306.  
  20307.         -------------------------------------------------------------------
  20308.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 356
  20309.  
  20310.                                            APPENDIX B / ASCII AND KEY CODES
  20311.         -------------------------------------------------------------------
  20312.  
  20313.  
  20314.         APPENDIX B / ASCII AND KEY CODES
  20315.  
  20316.  
  20317.         The tables in this section are based on U.S. English conventions.
  20318.         Your system may differ if it is configured for a different country
  20319.         or language.  See your operating system documentation for more
  20320.         information about country and language support.
  20321.  
  20322.  
  20323.         ASCII
  20324.  
  20325.              To represent the text you type, computers must translate each
  20326.              letter to and from a number.  The code used by all PC-
  20327.              compatible computers for this translation is called ASCII
  20328.              (American Standard Code for Information Interchange).
  20329.              Function keys, cursor keys, and Alt keys do not generate ASCII
  20330.              codes.  For details on these keys and a reference table, see
  20331.              Keys and Key Codes later in this Appendix.
  20332.  
  20333.              The ASCII table on the following pages is in three parts.
  20334.              Each part is described below.  The first two parts cover the
  20335.              128 standard ASCII characters; the third covers the 128
  20336.              extended ASCII characters used on the IBM PC and compatible
  20337.              computers.  All the tables include a Char column showing the
  20338.              visual representation of the character, a Dec column showing
  20339.              the decimal numeric value of the character in the ASCII set,
  20340.              and a Hex column showing the hexadecimal (base-16) value.
  20341.  
  20342.              ASCII Control Characters have numeric values between 0 and 31,
  20343.              and include non-printing characters like carriage return and
  20344.              line feed.  The ASCII standard does not define a visual
  20345.              representation for these characters, but the IBM PC character
  20346.              set does define one for most control characters as shown in
  20347.              the Char column of the table.  You can enter these characters
  20348.              using the key combination shown in the Ctrl column, with a
  20349.              caret [^] representing the Ctrl key.  For example, to enter
  20350.              character 4, the diamond symbol (^D), press the Ctrl and D
  20351.              keys together.  You can also enter control characters with the
  20352.              Alt key and the numeric keypad, like extended ASCII codes (see
  20353.              below).  The Name column shows a two or three character "name"
  20354.              given to each control character as part of the ASCII standard.
  20355.  
  20356.              ASCII Printing Characters have numeric values between 32 and
  20357.              127, and include the entire English-language character set as
  20358.              well as punctuation and other special marks.  You enter these
  20359.              characters by pressing the corresponding keyboard key.
  20360.              Character 127 has no keyboard key, but can be entered on many
  20361.              systems by typing Ctrl-Backspace.
  20362.  
  20363.         -------------------------------------------------------------------
  20364.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 357
  20365.  
  20366.                                            APPENDIX B / ASCII AND KEY CODES
  20367.         -------------------------------------------------------------------
  20368.  
  20369.              Extended ASCII Characters have values between 128 and 255 and
  20370.              include international language characters, line-drawing
  20371.              characters, and other symbols.  You can enter extended ASCII
  20372.              codes (or other character codes) on the keyboard by holding
  20373.              down the Alt key, entering the decimal numeric value of the
  20374.              key on the numeric keypad, and then releasing the Alt key.
  20375.  
  20376.  
  20377.  
  20378.  
  20379.  
  20380.  
  20381.  
  20382.  
  20383.  
  20384.  
  20385.  
  20386.  
  20387.  
  20388.  
  20389.  
  20390.  
  20391.  
  20392.  
  20393.  
  20394.  
  20395.  
  20396.  
  20397.  
  20398.  
  20399.  
  20400.  
  20401.  
  20402.  
  20403.  
  20404.  
  20405.  
  20406.  
  20407.  
  20408.  
  20409.  
  20410.  
  20411.  
  20412.  
  20413.  
  20414.  
  20415.  
  20416.  
  20417.  
  20418.  
  20419.         -------------------------------------------------------------------
  20420.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 358
  20421.  
  20422.                                            APPENDIX B / ASCII AND KEY CODES
  20423.         -------------------------------------------------------------------
  20424.  
  20425.  
  20426.  
  20427.  
  20428.  
  20429.  
  20430.  
  20431.  
  20432.  
  20433.  
  20434.  
  20435.  
  20436.  
  20437.  
  20438.  
  20439.  
  20440.  
  20441.  
  20442.  
  20443.  
  20444.  
  20445.  
  20446.  
  20447.  
  20448.  
  20449.  
  20450.  
  20451.  
  20452.  
  20453.  
  20454.  
  20455.  
  20456.  
  20457.  
  20458.  
  20459.  
  20460.  
  20461.  
  20462.  
  20463.  
  20464.  
  20465.  
  20466.  
  20467.  
  20468.  
  20469.  
  20470.  
  20471.  
  20472.  
  20473.  
  20474.  
  20475.         -------------------------------------------------------------------
  20476.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 359
  20477.  
  20478.                                            APPENDIX B / ASCII AND KEY CODES
  20479.         -------------------------------------------------------------------
  20480.  
  20481.  
  20482.  
  20483.  
  20484.  
  20485.  
  20486.  
  20487.  
  20488.  
  20489.  
  20490.  
  20491.  
  20492.  
  20493.  
  20494.  
  20495.  
  20496.  
  20497.  
  20498.  
  20499.  
  20500.  
  20501.  
  20502.  
  20503.  
  20504.  
  20505.  
  20506.  
  20507.  
  20508.  
  20509.  
  20510.  
  20511.  
  20512.  
  20513.  
  20514.  
  20515.  
  20516.  
  20517.  
  20518.  
  20519.  
  20520.  
  20521.  
  20522.  
  20523.  
  20524.  
  20525.  
  20526.  
  20527.  
  20528.  
  20529.  
  20530.  
  20531.         -------------------------------------------------------------------
  20532.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 360
  20533.  
  20534.                                            APPENDIX B / ASCII AND KEY CODES
  20535.         -------------------------------------------------------------------
  20536.  
  20537.  
  20538.         Keys and Key Codes
  20539.  
  20540.              When you press a single key or a key combination, software
  20541.              built into your computer (the BIOS or Basic Input / Output
  20542.              System) translates your keystroke into two numbers:  a scan
  20543.              code, representing the actual key that was pressed, and an
  20544.              ASCII code, representing the ASCII value for that key.  The
  20545.              BIOS returns these numbers the next time a program requests
  20546.              keyboard input.  This section explains how key codes work; for
  20547.              information on using them with 4DOS, 4OS2, and 4DOS/NT see the
  20548.              .INI file (page 136), keystroke aliases (page 159), INKEY
  20549.              (page 247), and KEYSTACK (page 254).
  20550.  
  20551.              Most 4DOS, 4OS2, and 4DOS/NT commands that use the numeric key
  20552.              codes listed here also use key names, which are usually more
  20553.              convenient to use than the numeric codes.  See page 31 for
  20554.              more information on key names.
  20555.  
  20556.              As PCs have evolved, the structure of keyboard codes has
  20557.              evolved somewhat haphazardly with them, resulting in a
  20558.              bewildering array of possible key codes.  We'll give you a
  20559.              basic explanation of how key codes work.  For a more in-depth
  20560.              discussion, refer to a BIOS or PC hardware reference manual.
  20561.  
  20562.              The nuances of how your keyboard behaves depends on the
  20563.              keyboard manufacturer, the computer manufacturer who provides
  20564.              the built-in BIOS, and your operating system.  As a result, we
  20565.              can't guarantee the accuracy of the information below for
  20566.              every system, but the discussion and reference table should be
  20567.              accurate for most systems.  Our discussion is based on the
  20568.              101-key "enhanced" keyboard commonly used on 286, 386, 486,
  20569.              and Pentium computers, but virtually all of it is applicable
  20570.              to the 84-key keyboards on older systems.  The primary
  20571.              difference is that older keyboards lack a separate cursor pad
  20572.              and only have 10 function keys.
  20573.  
  20574.              All keys have a scan code, but not all have an ASCII code.
  20575.              For example, function keys and cursor keys are not part of the
  20576.              ASCII character set (see page 357) and have no ASCII value,
  20577.              but they do have a scan code.  Some keys have more than one
  20578.              ASCII code.  The A, for example, has ASCII code 97 (lower case
  20579.              "a") if you press it by itself.  If you press it along with
  20580.              Shift, the ASCII code changes to 65 (upper case "A").  If you
  20581.              press Ctrl and A the ASCII code changes to 1.  In all these
  20582.              cases, the scan code (30) is unchanged because you are
  20583.              pressing the same physical key.
  20584.  
  20585.  
  20586.  
  20587.         -------------------------------------------------------------------
  20588.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 361
  20589.  
  20590.                                            APPENDIX B / ASCII AND KEY CODES
  20591.         -------------------------------------------------------------------
  20592.  
  20593.              Things are different if you press Alt-A.  Alt keystrokes have
  20594.              no ASCII code, so the BIOS returns an ASCII code of 0, along
  20595.              with the A key's scan code of 30.  This allows a program to
  20596.              detect all the possible variations of A, based on the
  20597.              combination of ASCII code and scan code.
  20598.  
  20599.              Some keys generate more than one scan code depending on
  20600.              whether Shift, Ctrl, or Alt is pressed.  This allows a program
  20601.              to differentiate between two different keystrokes on the same
  20602.              key, neither of which has a corresponding ASCII value.  For
  20603.              example, F1 has no ASCII value so it returns an ASCII code of
  20604.              0, and the F1 scan code of 59.  Shift-F1 also returns an ASCII
  20605.              code 0; if it also returned a scan code of 59, a program
  20606.              couldn't distinguish it from F1.  The BIOS or operating system
  20607.              translates scan codes for keys like Shift-F1 (and Ctrl-F1 and
  20608.              Alt-F1) so that each variation returns a different scan code
  20609.              along with an ASCII code of 0.
  20610.  
  20611.              On the 101-key keyboard there's one more variation:  non-ASCII
  20612.              keys on the cursor keypad (such as up-arrow) return the same
  20613.              scan code as the corresponding key on the numeric keypad, for
  20614.              compatibility reasons.  If they also returned an ASCII code of
  20615.              0, a program couldn't tell which key was pressed.  Therefore,
  20616.              these keys return an ASCII code of 224 rather than 0.  This
  20617.              means that older programs, which only look for an ASCII 0 to
  20618.              indicate a non-ASCII keystroke like up-arrow, may not detect
  20619.              these cursor pad keys properly.
  20620.  
  20621.              The number of different codes returned by any given key varies
  20622.              from one (for the spacebar) to four, depending on the key, the
  20623.              design of your keyboard, and the BIOS or operating system.
  20624.              Some keys, like Alt, Ctrl, and Shift by themselves or in
  20625.              combination with each other, plus Print Screen, SysReq, Scroll
  20626.              Lock, Pause, Break, Num Lock, and Caps Lock keys, do not have
  20627.              any code representations at all.  The same is true of
  20628.              keystrokes with more than one modifying key, like Ctrl-Shift-
  20629.              A.  The BIOS or operating system may perform special actions
  20630.              automatically when you press these keys (for example, it
  20631.              switches into Caps Lock mode when you press Caps Lock), but it
  20632.              does not report the keystrokes to whatever program is running.
  20633.              Programs which detect such keystrokes access the keyboard
  20634.              hardware directly, a subject which is beyond the scope of this
  20635.              manual.
  20636.  
  20637.              The following table lists all of the keys on the 101-key
  20638.              "enhanced" keyboard.  The keys are arranged roughly in scan
  20639.              code order, which is generally left to right, moving from the
  20640.              top of the keyboard to the bottom.
  20641.  
  20642.  
  20643.         -------------------------------------------------------------------
  20644.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 362
  20645.  
  20646.                                            APPENDIX B / ASCII AND KEY CODES
  20647.         -------------------------------------------------------------------
  20648.  
  20649.              Column 1 shows the key's keycap symbol or name.  Columns 2 and
  20650.              3 show the scan code, and the ASCII code if the key is
  20651.              unshifted.  Columns 4 and 5 contain the codes for the shifted
  20652.              key.  Columns 6 and 7 show the codes for Ctrl plus the key.
  20653.              The last column contains the scan code for Alt plus the key
  20654.              (Alt keystrokes have no ASCII code and always generate an
  20655.              ASCII code of 0, which is not shown).
  20656.  
  20657.              Key names prefaced by np are on the numeric keypad.  Those
  20658.              prefaced by cp are on the cursor keypad between the main
  20659.              typing keys and the number keypad.  The numeric keypad values
  20660.              are valid if Num Lock is turned off.  If you need to specify a
  20661.              number key from the numeric keypad, use the scan code shown
  20662.              for the keypad and the ASCII code shown for the corresponding
  20663.              typewriter key.  For example, the keypad "7" has a scan code
  20664.              of 71 (the np Home scan code) and an ASCII code of 54 (the
  20665.              ASCII code for "7").
  20666.  
  20667.              The chart is blank for key combinations that are not reported
  20668.              at all by the BIOS, like Ctrl-1 and Alt-PgUp.
  20669.  
  20670.  
  20671.  
  20672.  
  20673.  
  20674.  
  20675.  
  20676.  
  20677.  
  20678.  
  20679.  
  20680.  
  20681.  
  20682.  
  20683.  
  20684.  
  20685.  
  20686.  
  20687.  
  20688.  
  20689.  
  20690.  
  20691.  
  20692.  
  20693.  
  20694.  
  20695.  
  20696.  
  20697.  
  20698.  
  20699.         -------------------------------------------------------------------
  20700.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 363
  20701.  
  20702.                                            APPENDIX B / ASCII AND KEY CODES
  20703.         -------------------------------------------------------------------
  20704.  
  20705.  
  20706.                    Scan Codes and Key Codes for Top Two Keyboard Rows
  20707.  
  20708.  
  20709.  
  20710.                                      Shift  Shift  Ctrl   Ctrl   Alt
  20711.             Key Cap    Scan          Scan                              ASCII         ASCII         ASCII                                                   Scan          Scan
  20712.             Symbol     Code          Code                              Code          Code          Code                                                   Code          Code
  20713.  
  20714.  
  20715.             Esc        1             1                              27            27            27                                                   1             1
  20716.             1  !       2             2                              49            33                   120
  20717.             2  @       3             3                              50            64            0                                                   3             121
  20718.             3  #       4             4                              51            35                   122
  20719.             4  $       5             5                              52            36                   123
  20720.             5  %       6             6                              53            37                   124
  20721.             6  ^       7             7                              54            94            30                                                   7             125
  20722.             7  &       8             8                              55            38                   126
  20723.             8  *       9             9                              56            42                   127
  20724.             9  (       10            10                              57            40                   128
  20725.             0  )       11            11                              48            41                   129
  20726.             -  _       12            12                              45            95            31                                                   12            130
  20727.             =  +       13            13                              61            43                   131
  20728.             Backspace  14            14                              8             8             127                                                   14            14
  20729.  
  20730.             Tab        15            15                              9             0             0                                                   148           165
  20731.             Q          16            16                              113           81            17                                                   16            16
  20732.             W          17            17                              119           87            23                                                   17            17
  20733.             E          18            18                              101           69            5                                                   18            18
  20734.             R          19            19                              114           82            18                                                   19            19
  20735.             T          20            20                              116           84     20     20     20
  20736.             Y          21     121    21     89     21     25     21
  20737.             U          22            22                              117           85     22     21     22
  20738.             I          23     105    23     73     23     9      23
  20739.             O          24     111    24     79            15                                                   24            24
  20740.             P          25            25                              112           80     25     16     25
  20741.             [  {       26            26                              91            123           27                                                   26            26
  20742.             ]  }       27     93     27     125           29                                                   27            27
  20743.             Enter      28     13     28     13            10                                                   28            28
  20744.  
  20745.  
  20746.  
  20747.  
  20748.  
  20749.  
  20750.  
  20751.  
  20752.  
  20753.  
  20754.  
  20755.         -------------------------------------------------------------------
  20756.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 364
  20757.  
  20758.                                            APPENDIX B / ASCII AND KEY CODES
  20759.         -------------------------------------------------------------------
  20760.  
  20761.  
  20762.                  Scan Codes and Key Codes for Bottom Two Keyboard Rows
  20763.  
  20764.  
  20765.  
  20766.                                      Shift  Shift  Ctrl   Ctrl   Alt
  20767.             Key Cap    Scan          Scan                              ASCII         ASCII         ASCII                                                   Scan          Scan
  20768.             Symbol     Code          Code                              Code          Code          Code                                                   Code          Code
  20769.  
  20770.  
  20771.             A          30            30                              97            65            1                                                   30            30
  20772.             S          31            31                              115           83            19                                                   31            31
  20773.             D          32            32                              100           68            4                                                   32            32
  20774.             F          33            33                              102           70            6                                                   33            33
  20775.             G          34            34                              103           71            7                                                   34            34
  20776.             H          35            35                              104           72            8                                                   35            35
  20777.             J          36            36                              106           74            10                                                   36            36
  20778.             K          37            37                              107           75            11                                                   37            37
  20779.             L          38            38                              108           76            12                                                   38            38
  20780.             ; :        39            39                              59            58                   39
  20781.             '  "       40            40                              39            34                   40
  20782.  
  20783.             `  ~       41            41                              96            126                  41
  20784.             \  |       43            43                              92            124           28                                                   43            43
  20785.             Z          44            44                              122           90            26                                                   44            44
  20786.             X          45            45                              120           88            24                                                   45            45
  20787.             C          46            46                              99            67            3                                                   46            46
  20788.             V          47     118    47     86     47     22     47
  20789.             B          48     98     48     66            2                                                   48            48
  20790.             N          49            49                              110           78     49     14     49
  20791.             M          50            50                              109           77            13                                                   50            50
  20792.             ,  <       51     44     51     60                   51
  20793.             .  >       52     46     52     62                   52
  20794.             /  ?       53     47     53     63                   53
  20795.             Space      57            57                              32            32            32                                                   57            57
  20796.  
  20797.  
  20798.  
  20799.  
  20800.  
  20801.  
  20802.  
  20803.  
  20804.  
  20805.  
  20806.  
  20807.  
  20808.  
  20809.  
  20810.  
  20811.         -------------------------------------------------------------------
  20812.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 365
  20813.  
  20814.                                            APPENDIX B / ASCII AND KEY CODES
  20815.         -------------------------------------------------------------------
  20816.  
  20817.                 Scan Codes and Key Codes for Key Pads and Function Keys
  20818.  
  20819.  
  20820.  
  20821.                                      Shift  Shift  Ctrl   Ctrl   Alt
  20822.             Key Cap    Scan          Scan                              ASCII         ASCII         ASCII                                                   Scan          Scan
  20823.             Symbol     Code          Code                              Code          Code          Code                                                   Code          Code
  20824.  
  20825.  
  20826.             F1         59            84                              0             0             0                                                   94            104
  20827.             F2         60            85                              0             0             0                                                   95            105
  20828.             F3         61            86                              0             0             0                                                   96            106
  20829.             F4         62            87                              0             0             0                                                   97            107
  20830.             F5         63            88                              0             0             0                                                   98            108
  20831.             F6         64            89                              0             0             0                                                   99            109
  20832.             F7         65            90                              0             0             0                                                   100           110
  20833.             F8         66            91                              0             0             0                                                   101           111
  20834.             F9         67            92                              0             0             0                                                   102           112
  20835.             F10        68            93                              0             0             0                                                   103           113
  20836.             F11        133           135                              0             0             0                                                   137           139
  20837.             F12        134           136                              0             0             0                                                   138           140
  20838.  
  20839.             np *       55            55                              42            42            0                                                   150           55
  20840.             np Home    71            71                              0             55            0                                                   119
  20841.             cp Home    71            71                              224           224           224                                                   119           151
  20842.             np Up      72            72                              0             56            0                                                   141
  20843.             cp Up      72            72                              224           224           224                                                   141           152
  20844.             np PgUp    73            73                              0             57            0                                                   132
  20845.             cp PgUp    73            73                              224           224           224                                                   132           153
  20846.             np Minus   74            74                              45            45            0                                                   142           74
  20847.             np Left    75            75                              0             52            0                                                   115
  20848.             cp Left    75     224    75     224           224                                                   115           155
  20849.             np 5       76     0      76     53     143    0
  20850.             np Right   77     0      77     54            0                                                   116
  20851.             cp Right   77     224    77     224    116    224    157
  20852.             np Plus    78            78                              43            43            0                                                   144           78
  20853.             np End     79            79                              0             49            0                                                   117
  20854.             cp End     79     224    79     224           224                                                   117           159
  20855.             np Down    80            80                              0             50            0                                                   145
  20856.             cp Down    80            80                              224           224           224                                                   145           160
  20857.             np PgDn    81            81                              0             51     118    0
  20858.             cp PgDn    81     224    81     224    118    224    161
  20859.             np Ins     82            82                              0             48     146    0
  20860.             cp Ins     82            82                              224           224           224                                                   146           162
  20861.             np Del     83     0      83     46            0                                                   147
  20862.             cp Del     83            83                              224           224    147    224    163
  20863.             np /       224    47     224    47            0                                                   149           164
  20864.  
  20865.  
  20866.  
  20867.         -------------------------------------------------------------------
  20868.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 366
  20869.  
  20870.                                            APPENDIX B / ASCII AND KEY CODES
  20871.         -------------------------------------------------------------------
  20872.  
  20873.             np Enter   224    13     224    13     224    10     166
  20874.  
  20875.  
  20876.  
  20877.  
  20878.  
  20879.  
  20880.  
  20881.  
  20882.  
  20883.  
  20884.  
  20885.  
  20886.  
  20887.  
  20888.  
  20889.  
  20890.  
  20891.  
  20892.  
  20893.  
  20894.  
  20895.  
  20896.  
  20897.  
  20898.  
  20899.  
  20900.  
  20901.  
  20902.  
  20903.  
  20904.  
  20905.  
  20906.  
  20907.  
  20908.  
  20909.  
  20910.  
  20911.  
  20912.  
  20913.  
  20914.  
  20915.  
  20916.  
  20917.  
  20918.  
  20919.  
  20920.  
  20921.  
  20922.  
  20923.         -------------------------------------------------------------------
  20924.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 367
  20925.  
  20926.                                                                    GLOSSARY
  20927.         -------------------------------------------------------------------
  20928.  
  20929.  
  20930.         GLOSSARY
  20931.  
  20932.  
  20933.         Some items in this glossary refer to features or to terms which are
  20934.         discussed in more detail elsewhere in this manual.  Be sure to
  20935.         check the index to see if more information is available on a
  20936.         particular feature or term.
  20937.  
  20938.              4EXIT:  A batch file which is executed whenever a secondary
  20939.              4DOS, 4OS2, or 4DOS/NT shell ends.
  20940.  
  20941.              4START:  A batch file which is executed whenever 4DOS, 4OS2,
  20942.              or 4DOS/NT is started, either as a primary shell or a
  20943.              secondary shell.
  20944.  
  20945.              Alias:  A shorthand name for a command or series of commands.
  20946.  
  20947.              Alias Parameter:  A numbered variable (e.g. %2) included in an
  20948.              alias definition, allowing a different value to be used in the
  20949.              alias each time it is executed.
  20950.  
  20951.              AND:  A logical combination of two true or false conditions.
  20952.              If both conditions are true, the result is true; if either
  20953.              condition is false, the result is false.
  20954.  
  20955.              ANSI.SYS:  A device driver supplied with DOS which provides
  20956.              enhanced screen display and keyboard macros, or one of the
  20957.              many similar programs.
  20958.  
  20959.              APM:  A standardized system used by manufacturers of battery-
  20960.              powered computers to report battery status and control power
  20961.              management features.
  20962.  
  20963.              Append:  Concatenation of one file or string onto the end of
  20964.              another (this use is not related to the DOS and OS/2 external
  20965.              command named APPEND).
  20966.  
  20967.              Application:  A program run from the command prompt or a batch
  20968.              file.  Used broadly to mean any program other than the command
  20969.              processor; and more narrowly to mean a program with a specific
  20970.              purpose such as a spreadsheet or word processing program, as
  20971.              opposed to a utility.
  20972.  
  20973.              Archive:  A file attribute indicating that the file has been
  20974.              modified since the last backup (most backup programs clear
  20975.              this attribute).  Also sometimes refers to a single file (such
  20976.              as a .ZIP file) which contains a number of other files in
  20977.              compressed form.
  20978.  
  20979.         -------------------------------------------------------------------
  20980.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 368
  20981.  
  20982.                                                                    GLOSSARY
  20983.         -------------------------------------------------------------------
  20984.  
  20985.              Argument:  See Parameter.
  20986.  
  20987.              ASCII:  The American Standard Code for Information
  20988.              Interchange, which defines numeric values for 128 different
  20989.              characters comprising the English alphabet, numbers,
  20990.              punctuation, and some control characters.
  20991.  
  20992.              ASCII File:  A file containing ASCII text, as opposed to a
  20993.              binary file which may contain numbers, or other information
  20994.              that cannot be sensibly interpreted as text.
  20995.  
  20996.              Attribute:  A characteristic of a file which can be set or
  20997.              cleared.  The standard attributes are Read-Only, Hidden,
  20998.              System, and Archive.
  20999.  
  21000.              Automatic Directory Change:  A 4DOS, 4OS2, and 4DOS/NT feature
  21001.              which allows you to change directories by typing the directory
  21002.              name and a backslash [\] at the prompt.
  21003.  
  21004.              Base Memory:  Under DOS, the portion of your computer's memory
  21005.              available for use by DOS, the command processor, and
  21006.              application programs.  On most PCs this area consists of the
  21007.              first 640K or 655,360 bytes of the computer's memory.
  21008.  
  21009.              Base Name:  The file name without a drive, path, or extension.
  21010.              For example, in the file name C:\DIR1\LETTER.DAT the base name
  21011.              is LETTER.
  21012.  
  21013.              BAT File:  Same as a Batch File.
  21014.  
  21015.              Batch File:  A text file containing a sequence of commands for
  21016.              the command processor to execute.  Batch files are used to
  21017.              save command sequences so that they can be re-executed at any
  21018.              time, transferred to another system, etc.
  21019.  
  21020.              Batch File Parameter:  A numbered variable (e.g. %2) used
  21021.              within a batch file, allowing a different value to be used at
  21022.              that spot in the file each time it is executed.
  21023.  
  21024.              Binary File:  A file containing information which does not
  21025.              represent or cannot sensibly be interpreted as text.  See also
  21026.              ASCII File.
  21027.  
  21028.              Block Device:  A physical device for input or output which can
  21029.              transmit or receive large blocks of data while the computer is
  21030.              engaged in other activities.  Examples include disk, tape, and
  21031.              CD-ROM drives.  See also Character Device.
  21032.  
  21033.  
  21034.  
  21035.         -------------------------------------------------------------------
  21036.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 369
  21037.  
  21038.                                                                    GLOSSARY
  21039.         -------------------------------------------------------------------
  21040.  
  21041.              Boot:  The process of starting the computer and loading the
  21042.              operating system into memory.
  21043.  
  21044.              Boot Directory:  The current directory at the time the system
  21045.              is booted, usually the root directory of the boot drive.
  21046.  
  21047.              Boot Drive:  The disk drive that the system is booted from,
  21048.              usually A: (the floppy disk) or C: (the hard disk).
  21049.  
  21050.              Break:  A signal sent to a program to tell it to halt what it
  21051.              is doing.  The Ctrl-C key  or Ctrl-Break key is used to send
  21052.              this signal.  Some external commands abort when they receive a
  21053.              break signal; others return to a previous screen or menu, or
  21054.              abort the current operation.
  21055.  
  21056.              BTM File:  A special type of batch file which is loaded into
  21057.              memory to speed up execution.
  21058.  
  21059.              Buffer:  An area of memory set aside for storage.  For
  21060.              example, disk buffers are used to save information as it is
  21061.              transferred between your program and the disk, and the
  21062.              keyboard buffer holds keystrokes until a program can use them.
  21063.  
  21064.              Character Device:  A physical device for input or output which
  21065.              must communicate with your computer one character at a time.
  21066.              Examples include the console, communications ports, and
  21067.              printers.  See also Block Device.
  21068.  
  21069.              Code Page:  A set of definitions which tells DOS or OS/2 how
  21070.              to get and display date, time, and other information in the
  21071.              format appropriate to a particular country.
  21072.  
  21073.              Command Completion:  A 4DOS, 4OS2, and 4DOS/NT feature which
  21074.              allows you to recall a previous command by typing the first
  21075.              few letters of the command, then an up-arrow or down-arrow.
  21076.  
  21077.              Command Echoing:  A feature which displays commands as they
  21078.              are executed.  Echoing can be turned on and off.
  21079.  
  21080.              Command History:  A 4DOS, 4OS2, and 4DOS/NT feature which
  21081.              retains commands you have executed, so that they can be
  21082.              modified and re-executed later.
  21083.  
  21084.              Command History Window:  A pop-up window used by 4DOS, 4OS2,
  21085.              and 4DOS/NT to display the command history, allowing you to
  21086.              choose a previous command to modify and/or execute.
  21087.  
  21088.  
  21089.  
  21090.  
  21091.         -------------------------------------------------------------------
  21092.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 370
  21093.  
  21094.                                                                    GLOSSARY
  21095.         -------------------------------------------------------------------
  21096.  
  21097.              Command Processor:  A program which interprets commands and
  21098.              executes other programs.  Sometimes also called a Command
  21099.              Interpreter.
  21100.  
  21101.              Command Recall:  See Command History.
  21102.  
  21103.              Command Tail:  The portion of a command consisting of all the
  21104.              arguments, i.e., everything but the command name itself.
  21105.  
  21106.              Compound Command:  See Multiple Commands.
  21107.  
  21108.              COMSPEC:  An environment variable which defines where to find
  21109.              the command processor to start a secondary shell.
  21110.  
  21111.              Conditional Commands:  A 4DOS, 4OS2, and 4DOS/NT feature
  21112.              allowing commands to be executed or skipped depending on the
  21113.              results of a previous command.   See also Exit Code.
  21114.  
  21115.              Console:  The PC keyboard and display.
  21116.  
  21117.              Control Character:  A character which is part of the ASCII
  21118.              code, but does not have a normal text representation, and
  21119.              which can be generated by pressing the Ctrl key along with
  21120.              another key.
  21121.  
  21122.              Country Code:  See Code Page.
  21123.  
  21124.              CPU:  The Central Processing Unit which performs all logic and
  21125.              calculations in a computer.  In PC-compatible systems, the CPU
  21126.              is on a single microprocessor chip.
  21127.  
  21128.              CR:  The ASCII character "carriage return", generated by
  21129.              pressing the Enter key on the keyboard, and stored in most
  21130.              ASCII files at the end of each line.
  21131.  
  21132.              Critical Error:  An error, usually related to a physical or
  21133.              hardware problem with input, output, or network access, which
  21134.              prevents a program from continuing.
  21135.  
  21136.              Current Directory:  The directory in which all file operations
  21137.              will take place unless otherwise specified.
  21138.  
  21139.              Date Range:  A 4DOS, 4OS2, and 4DOS/NT feature which allows
  21140.              you to select files based on the date and time they were last
  21141.              modified.
  21142.  
  21143.              Description:  A string of characters assigned to describe a
  21144.              file with the 4DOS, 4OS2, or 4DOS/NT DESCRIBE command.
  21145.  
  21146.  
  21147.         -------------------------------------------------------------------
  21148.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 371
  21149.  
  21150.                                                                    GLOSSARY
  21151.         -------------------------------------------------------------------
  21152.  
  21153.              Destination:  In file processing commands (e.g. COPY or MOVE),
  21154.              the name or directory files should have after any copying or
  21155.              modification has taken place, generally the last specification
  21156.              on the command line.  See also Source.
  21157.  
  21158.              Device:  A physical device for input or output such as the
  21159.              console, a communications port, or a printer.  Sometimes
  21160.              "device" is used to refer to character devices, and excludes
  21161.              block devices.
  21162.  
  21163.              Device Driver:  A program which allows the operating system to
  21164.              communicate with a device, and which is loaded into memory
  21165.              when the system boots.  Device drivers are also used to manage
  21166.              memory or for other similar internal functions.
  21167.  
  21168.              Directory:  A portion of any disk, identified by a name and a
  21169.              relationship to other directories in a "tree" structure, with
  21170.              the tree starting at the root directory.  A directory
  21171.              separates files on the disk into logical groups, but does not
  21172.              represent a physical division of the data on the disk.
  21173.  
  21174.              Directory History:  A 4DOS, 4OS2, and 4DOS/NT feature which
  21175.              allows you to recall recently-used directory names in a window
  21176.              and choose one to switch to.
  21177.  
  21178.              Disk Swapping:  A type of swapping in which the transient
  21179.              portion of 4DOS is stored on disk while an application is
  21180.              running.
  21181.  
  21182.              DOS Memory:  See Base Memory.
  21183.  
  21184.              DOS Session:  See Session.
  21185.  
  21186.              Echo:  See Command Echoing.
  21187.  
  21188.              EMS Memory:  Under DOS, memory which conforms to the Lotus /
  21189.              Intel / Microsoft Expanded Memory Specification (LIM EMS),
  21190.              which allows programs to access large amounts of memory
  21191.              outside of base memory or extended memory.
  21192.  
  21193.              EMS Swapping:  A type of swapping in which the transient
  21194.              portion of 4DOS is stored in EMS memory while an application
  21195.              is running.
  21196.  
  21197.              Environment:  An area of memory which contains multiple
  21198.              entries in the form "NAME=value".  See also Master Environment
  21199.              and Passed Environment.
  21200.  
  21201.  
  21202.  
  21203.         -------------------------------------------------------------------
  21204.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 372
  21205.  
  21206.                                                                    GLOSSARY
  21207.         -------------------------------------------------------------------
  21208.  
  21209.              Environment Variable:  The name of a single entry in the
  21210.              environment.
  21211.  
  21212.              Errorlevel:  A numeric value between 0 and 255 returned from
  21213.              an external command to indicate its result (e.g., success,
  21214.              failure, response to a question).  See also Exit Code.
  21215.  
  21216.              Escape Character:  In some contexts, the 4DOS, 4OS2, or
  21217.              4DOS/NT escape character, which is used to suppress the normal
  21218.              meaning of or give special meaning to the following character.
  21219.              In other cases, the specific ASCII character ESC.  The meaning
  21220.              must be determined from the context.
  21221.  
  21222.              Executable Extensions:  A 4DOS, 4OS2, and 4DOS/NT feature
  21223.              which allows you to specify the application to be executed
  21224.              when a file with a particular extension is named at the
  21225.              command prompt.
  21226.  
  21227.              Executable File:  A file, usually with the extension .COM or
  21228.              .EXE, which can be loaded into memory and run as a program.
  21229.  
  21230.              Exit Code:  The result code returned by an external command or
  21231.              an internal command.  4DOS, 4OS2, and 4DOS/NT internal
  21232.              commands return an exit code of 0 if successful, or non-zero
  21233.              if unsuccessful.  See also Errorlevel.
  21234.  
  21235.              Expansion:  The process 4DOS, 4OS2, and 4DOS/NT go through
  21236.              when they scan a command line and substitute the appropriate
  21237.              actual values for aliases, alias parameters, batch file
  21238.              parameters, and environment variables.  See also Parsing.
  21239.  
  21240.              Extended ASCII Character:  A character which is not part of
  21241.              the standard set of 128 ASCII characters, but is used on the
  21242.              PC as part of an extended set of 256 characters.  These
  21243.              characters include international language symbols, and box and
  21244.              line drawing characters.
  21245.  
  21246.              Extended Memory:  Any memory on a 286-based (PC-AT
  21247.              compatible), 386, 486, or Pentium-based computer system which
  21248.              is above the 1 MB (one megabyte, or 1024*1024 bytes) of memory
  21249.              that DOS can address directly.  See also XMS.
  21250.  
  21251.              Extended Parent Directory Names:  A 4DOS, 4OS2, and 4DOS/NT
  21252.              feature which allows you to use additional periods in a
  21253.              directory name to represent directories which are successively
  21254.              higher in the directory tree.
  21255.  
  21256.  
  21257.  
  21258.  
  21259.         -------------------------------------------------------------------
  21260.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 373
  21261.  
  21262.                                                                    GLOSSARY
  21263.         -------------------------------------------------------------------
  21264.  
  21265.              Extended Wildcard:  A 4DOS, 4OS2, and 4DOS/NT feature which
  21266.              allows you to use multiple wildcard characters, extending the
  21267.              traditional wildcard syntax.  See also Wildcard.
  21268.  
  21269.              Extension:  The final portion of a file name, preceded by a
  21270.              period.  For example, in the file name C:\DIR1\LETTER.DAT the
  21271.              extension is .DAT.
  21272.  
  21273.              External Command:  A program which resides in an executable
  21274.              file, as opposed to an internal command which is part of the
  21275.              command processor.
  21276.  
  21277.              FAT File System:  The traditional file system used by DOS to
  21278.              store files on diskettes and hard disks; also supported by
  21279.              OS/2 and Windows NT.  Uses a File Allocation Table to keep
  21280.              track of allocated and unallocated space on the disk.
  21281.  
  21282.              File Attribute:  See Attribute.
  21283.  
  21284.              File Description:  See Description.
  21285.  
  21286.              Filename Completion:  A 4DOS, 4OS2, and 4DOS/NT feature which
  21287.              allows you to type part of a filename on the command line, and
  21288.              have the command processor fill in the rest for you.
  21289.  
  21290.              Free Memory:  Usually, the amount of base memory (under DOS)
  21291.              or total memory (under OS/2 and Windows NT) which is
  21292.              unoccupied and available for applications.
  21293.  
  21294.              Hidden:  A file attribute indicating that the file should not
  21295.              be displayed with a normal DIR command, and should not be made
  21296.              available to programs unless they specifically request access
  21297.              to hidden files.
  21298.  
  21299.              History:  See Command History.
  21300.  
  21301.              History Window:  See Command History Window and Directory
  21302.              History.
  21303.  
  21304.              HPFS or High Performance File System:  A file system
  21305.              distributed with OS/2 and Windows NT which allows longer file
  21306.              names and provides better performance than the traditional FAT
  21307.              file system.
  21308.  
  21309.              Include List:  A concise method of specifying several files or
  21310.              groups of files in the same directory, for use with all 4DOS,
  21311.              4OS2, and 4DOS/NT commands which take file names as arguments.
  21312.  
  21313.  
  21314.  
  21315.         -------------------------------------------------------------------
  21316.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 374
  21317.  
  21318.                                                                    GLOSSARY
  21319.         -------------------------------------------------------------------
  21320.  
  21321.              .INI File:  The 4DOS, 4OS2, or 4DOS/NT initialization file
  21322.              containing directives which set the initial configuration of
  21323.              the command processor.
  21324.  
  21325.              Insert Mode:  When editing text, a mode in which newly typed
  21326.              characters are inserted into the line at the cursor position,
  21327.              rather than overwriting existing characters on the line.  See
  21328.              also Overstrike Mode.
  21329.  
  21330.              Internal Command:  A command which is part of the command
  21331.              processor, as opposed to an external command.
  21332.  
  21333.              Keyboard Buffer:  A buffer which holds keystrokes you have
  21334.              typed that have not yet been used by the currently executing
  21335.              program.
  21336.  
  21337.              Keystroke Alias:  An alias assigned to a key, so that it can
  21338.              be invoked or recalled with a single keystroke.
  21339.  
  21340.              Label:  A marker in a batch file, with the format :name,
  21341.              allowing GOTO and GOSUB commands to "jump" to that point in
  21342.              the file.  See also Volume Label.
  21343.  
  21344.              LF:  The ASCII character "line feed", not usually generated
  21345.              from the keyboard, but stored in most ASCII files at the end
  21346.              of each line, after the CR character.
  21347.  
  21348.              Master Environment:  The master copy of the environment
  21349.              maintained by the command processor.
  21350.  
  21351.              Memory Resident Mode:  A method of installing 4DOS in which
  21352.              swapping is disabled, and all of 4DOS remains permanently
  21353.              resident in memory.
  21354.  
  21355.              Modulo:  The remainder after an integer division.  For example
  21356.              11 modulo 3 is 2, because when 11 is divided by 3 the
  21357.              remainder is 2.
  21358.  
  21359.              Multiple Commands:  A 4DOS, 4OS2, and 4DOS/NT feature which
  21360.              allows multiple commands to be placed on a line, separated by
  21361.              a caret [^] in 4DOS, an ampersand [&] in 4OS2 and 4DOS/NT, or
  21362.              another, user-defined character.
  21363.  
  21364.              Multitasking:  A capability of some software (and the related
  21365.              hardware) which allows two or more programs to run apparently
  21366.              simultaneously on the same computer.  Multitasking software
  21367.              for PC compatible systems includes programs like OS/2,
  21368.              Windows, Windows NT, and DESQview.
  21369.  
  21370.  
  21371.         -------------------------------------------------------------------
  21372.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 375
  21373.  
  21374.                                                                    GLOSSARY
  21375.         -------------------------------------------------------------------
  21376.  
  21377.              NTFS or New Technology File System:  A file system distributed
  21378.              with Windows NT with characteristics similar to HPFS.  See
  21379.              also HPFS.
  21380.  
  21381.              Non-Swapping Mode:  See Memory Resident Mode.
  21382.  
  21383.              Operating System:  A collection of software which loads when
  21384.              the computer is started, provides services to other software,
  21385.              and ensures that programs don't interfere with each other
  21386.              while they are running.
  21387.  
  21388.              Option:  See Switch.
  21389.  
  21390.              OR:  A logical combination of two true or false conditions.
  21391.              If both conditions are false the result is false; if either
  21392.              condition is true the result is true.
  21393.  
  21394.              Overstrike Mode:  When editing text, a mode in which newly
  21395.              typed characters overwrite existing characters on the line,
  21396.              rather than being inserted into the line at the cursor
  21397.              position.  See also Insert Mode.
  21398.  
  21399.              Parameter:  A piece of additional information placed after a
  21400.              command or function name.  For example, in the command DIR
  21401.              XYZ, XYZ is a parameter.  Also used to refer to an alias
  21402.              parameter or batch file parameter.
  21403.  
  21404.              Parsing:  The process 4DOS, 4OS2, and 4DOS/NT perform when
  21405.              they analyze the command line, perform alias and environment
  21406.              variable expansion, and find the appropriate internal command
  21407.              or external command to execute.
  21408.  
  21409.              Passed Environment:  A copy of the master environment created
  21410.              before running an application, so that any changes made by the
  21411.              application will not affect the master environment.
  21412.  
  21413.              Path:  A specification of all the directories a file resides
  21414.              in.  For example, the path for C:\WPFILES\MYDIR\MEMO.TXT is
  21415.              C:\WPFILES\MYDIR\.  Also used to refer to the environment
  21416.              variable PATH, which contains a series of path specifications
  21417.              used when searching for external commands and batch files.
  21418.  
  21419.              Pipe:  A method for collecting the standard output of one
  21420.              program and passing it on as the standard input of the next
  21421.              program to be executed, signified by a vertical bar "|" on the
  21422.              command line. See also Redirection.
  21423.  
  21424.  
  21425.  
  21426.  
  21427.         -------------------------------------------------------------------
  21428.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 376
  21429.  
  21430.                                                                    GLOSSARY
  21431.         -------------------------------------------------------------------
  21432.  
  21433.              Primary Shell:  The copy of the command processor which is
  21434.              loaded by the operating system when the system boots or a
  21435.              session opens.
  21436.  
  21437.              RAM Disk:  A pseudo "disk drive", created by software, which
  21438.              appears like a normal physical disk drive to programs.
  21439.              Sometimes also called a "virtual disk."
  21440.  
  21441.              Range:  See Date Range, Size Range, and Time Range.
  21442.  
  21443.              Read-Only:  A file attribute indicating that the file can be
  21444.              read, but not written or deleted by the operating system or
  21445.              the command processor unless special commands are used.
  21446.  
  21447.              Reboot:  The process of restarting the computer, usually by
  21448.              pressing the Ctrl, Alt, and Del keys simultaneously.
  21449.  
  21450.              Redirection:  A method for collecting output from a program in
  21451.              a file, and/or of providing the input for a program from a
  21452.              file.  See also Pipe.
  21453.  
  21454.              Resident Portion:  The small portion of 4DOS stored
  21455.              permanently in memory when swapping mode is in use, as opposed
  21456.              to the larger transient portion.
  21457.  
  21458.              Root Directory:  The first directory on any disk, from which
  21459.              all other directories are "descended."  The root directory is
  21460.              referenced with a single backslash [\].
  21461.  
  21462.              Secondary Shell:  Any copy of the command processor which is
  21463.              started by another program, rather than by the operating
  21464.              system.
  21465.  
  21466.              Session:  A general term for the individual windows or tasks
  21467.              started by a multitasking system.  For example, under OS/2 you
  21468.              might run an OS/2 program in one session, and a DOS program in
  21469.              another.
  21470.  
  21471.              Shell:  See Command Processor.  Also used to refer to a
  21472.              program which gives access to DOS functions and commands
  21473.              through a menu- or mouse-driven system.
  21474.  
  21475.              Size Range:  A 4DOS, 4OS2, and 4DOS/NT feature which allows
  21476.              you to select files based on their size.
  21477.  
  21478.              Source:  In file processing commands (e.g. COPY or MOVE), the
  21479.              original files before any copying or modification has taken
  21480.              place, i.e., those specified earlier on the command line.  See
  21481.              also Destination.
  21482.  
  21483.         -------------------------------------------------------------------
  21484.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 377
  21485.  
  21486.                                                                    GLOSSARY
  21487.         -------------------------------------------------------------------
  21488.  
  21489.              Stack:  An area of memory used by any program to store
  21490.              temporary data while the program is running; more generally,
  21491.              any such storage area where the last item stored is normally
  21492.              the first one removed.
  21493.  
  21494.              Standard Error, Standard Input, and Standard Output:  The
  21495.              file(s) or character device(s) where a program respectively
  21496.              displays error messages, obtains its normal input, and
  21497.              displays its normal output.  Standard error, standard input,
  21498.              and standard output always refer to the console, unless
  21499.              redirection is used.
  21500.  
  21501.              Subdirectory:  Any directory other than the root directory.
  21502.  
  21503.              Swap File:  A disk file created by 4DOS to store its transient
  21504.              portion when disk swapping is in use.
  21505.  
  21506.              Swapping:  A 4DOS feature which removes the larger transient
  21507.              portion of 4DOS from base memory while an application is
  21508.              running, leaving the maximum possible amount of memory for the
  21509.              application.
  21510.  
  21511.              Switch:  A parameter for an internal command or application
  21512.              which specifies a particular behavior or setting.  For
  21513.              example, the command "DIR /P" might be referred to as "having
  21514.              the /P switch set".
  21515.  
  21516.              System:  A file attribute indicating that the file belongs to
  21517.              the operating system or command processor, and should not be
  21518.              accessed by other programs.
  21519.  
  21520.              Target:  See Destination.
  21521.  
  21522.              Time Range:  A 4DOS, 4OS2, and 4DOS/NT feature which allows
  21523.              you to select files based on the time they were last modified.
  21524.  
  21525.              Transient Portion:  The larger portion of 4DOS stored in
  21526.              memory temporarily when swapping is in use, as opposed to the
  21527.              smaller resident portion.
  21528.  
  21529.              TSR:  A DOS Terminate and Stay Resident program, i.e., a
  21530.              program which "terminates" but remains resident in memory, to
  21531.              provide features such as network support, a pop-up notepad or
  21532.              telephone dialer, a disk cache, or mouse support.
  21533.  
  21534.              UMB:  An XMS Upper Memory Block, whose address is above the
  21535.              end of base memory, but within the 1 megabyte of memory that
  21536.              DOS can address directly.
  21537.  
  21538.  
  21539.         -------------------------------------------------------------------
  21540.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 378
  21541.  
  21542.                                                                    GLOSSARY
  21543.         -------------------------------------------------------------------
  21544.  
  21545.              Variable:  See Alias Parameter, Batch File Parameter, and
  21546.              Environment Variable.
  21547.  
  21548.              Virtual Disk:  See RAM Disk.
  21549.  
  21550.              Volume Label:  A special, hidden file placed on any disk,
  21551.              whose name constitutes a "label" for the entire disk.
  21552.  
  21553.              White Space Character:  A character used to separate arguments
  21554.              on the command line.  The white space characters recognized by
  21555.              4DOS, 4OS2, and 4DOS/NT are the space, tab, and comma.
  21556.  
  21557.              Wildcard:  A character ("*" or "?") used in a filename to
  21558.              specify the possibility that any single character ("?") or
  21559.              sequence of characters ("*") can occur at that point in the
  21560.              actual name.  See also Extended Wildcard.
  21561.  
  21562.              XMS Memory:  A software method for accessing extended memory
  21563.              under DOS.  XMS memory is not additional memory, but is a
  21564.              software specification only.
  21565.  
  21566.              XMS Swapping:  A type of swapping where the transient portion
  21567.              of 4DOS is stored in XMS memory while an application is
  21568.              running.
  21569.  
  21570.              XOR (exclusive OR):  A logical combination of two true or
  21571.              false conditions.  If both conditions are false or both
  21572.              conditions are true the result is false; if either condition
  21573.              is true and the other is false the result is true.
  21574.  
  21575.  
  21576.  
  21577.  
  21578.  
  21579.  
  21580.  
  21581.  
  21582.  
  21583.  
  21584.  
  21585.  
  21586.  
  21587.  
  21588.  
  21589.  
  21590.  
  21591.  
  21592.  
  21593.  
  21594.  
  21595.         -------------------------------------------------------------------
  21596.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 379
  21597.  
  21598.                                                                       Index
  21599.         -------------------------------------------------------------------
  21600.  
  21601.         Index                               * (asterisk)
  21602.                                                 as file name "wildcard", 57
  21603.                                                 in alias name, 159
  21604.         Conventions:  Most fully                in alias value, 157
  21605.         capitalized terms (e.g., ECHO,          to temporarily disable an
  21606.         SELECT) are command names                 alias, 46, 85, 157
  21607.         unless otherwise noted.
  21608.                                             ., see Current directory
  21609.                                             .., see Parent directory
  21610.               Special Characters
  21611.                                             /, in command switches, 149
  21612.  
  21613.         ## advanced topic mark, 3, 33,      ; (semicolon)
  21614.          151                                    in HPFS and NTFS file
  21615.                                                   names, 17, 60
  21616.         ! warning mark, 3, 151                  in include lists, 65
  21617.  
  21618.         $ (dollar sign), as parameter       ? as file name "wildcard", 57
  21619.          character, 134, 311                ? command, 153
  21620.             in batch files, 79
  21621.                                             @ sign, see also Variable
  21622.         % sign                               functions
  21623.             and alias parameters, 162           for key codes, 32
  21624.             and batch file parameters,              in a keystroke alias,
  21625.               78                                      161
  21626.             and environment variables,          in file names, 16
  21627.               94, 95                            in INKEY results, 247
  21628.             in file names, 16                   to define a keystroke
  21629.             use with variable                     alias, 159
  21630.               functions, 105                    to override batch file
  21631.         %# and %n&                                echo, 78, 214, 291
  21632.             changing parameter                  to override command history
  21633.               character, 134, 311                 save, 36
  21634.             in aliases, 162                     to read a file in FOR, 224
  21635.             in batch files, 79, 316
  21636.         %0 to %127                          ^ (caret)
  21637.             in aliases, 162                     as command separator, 131,
  21638.             in batch files, 78, 316               309
  21639.                                                 as escape character, 132,
  21640.         & (ampersand)                             310
  21641.             as command separator, 131,
  21642.               309                           || (or) in conditional
  21643.             as parameter character,          commands, 69
  21644.               134, 311
  21645.                 in batch files, 79
  21646.         && (and) in conditional
  21647.           commands, 69
  21648.  
  21649.  
  21650.  
  21651.         -------------------------------------------------------------------
  21652.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 380
  21653.  
  21654.                                                                       Index
  21655.         -------------------------------------------------------------------
  21656.  
  21657.                        4
  21658.                                             Aliases (continued)
  21659.         4DOS                                    back-quotes in, 119, 156,
  21660.             and DESQview, 142                     161, 166
  21661.             and disk caching software,          defining default command
  21662.               142                                 options with, 157, 163
  21663.             and DR DOS, 242, 257, 338           disabling, 46, 85, 157, 312
  21664.             and HPFS files, 17                  editing, 218
  21665.             and MS-DOS 5.0 and above,           examples, 74, 84, 86
  21666.               257                               expansion, 48, 116
  21667.             and Novell DOS, see 4DOS                and batch file
  21668.               and DR DOS                              debugging, 87
  21669.             and Windows, see Microsoft              disabling, 312
  21670.               Windows                               nested, 116
  21671.             configuration, 120                  global, 128, 163
  21672.             memory usage, 130                       storing in upper
  21673.             resident portion, loading                 memory, 129
  21674.               in upper memory, 130              in batch files, 84
  21675.             REXX support in, 92                 inheritance, in secondary
  21676.             stack size, 143                       shells, 143
  21677.         4DOS/NT                                 internal variables in, 163
  21678.             configuration, 120                  keystroke, 76, 159
  21679.             EXTPROC support in, 93                  and key assignments,
  21680.             REXX support in, 92                       137
  21681.         4EXIT, 83                                   automatic execution of,
  21682.             location of, 125                          71, 76, 160
  21683.         4OS2                                    local, 128, 163
  21684.             configuration, 120                  memory space for, 100, 125,
  21685.             EXTPROC support in, 93                267
  21686.             REXX support in, 92                 multiple commands in, 156
  21687.         4START, 82, 105                         nested, 75, 116, 157
  21688.             location of, 125                    order of execution, 116
  21689.                                                 parameters, 162, 163
  21690.                        A                            expansion, 117
  21691.                                                 reading from a file, 166
  21692.         Abort, Retry, Fail message, see         removing, 335
  21693.           Critical errors                       saving in a file, 161
  21694.         ACTIVATE command, 154                   saving temporarily, 315
  21695.         Advanced Power Management               sharing between 4DOS, 4OS2,
  21696.           status, 100                             and 4DOS/NT, 72
  21697.         Advanced topic mark, see v              storing in upper memory,
  21698.         ALIAS command, 19, 155                    129
  21699.         Aliases, 74, 155                        suspending execution of,
  21700.             and executable extensions,            279
  21701.               66                                variable functions in, 115,
  21702.             and QUIT, 287                         163
  21703.             asterisk in name, 159           And (&&) in conditional
  21704.             asterisk in value, 157            commands, 69
  21705.  
  21706.  
  21707.         -------------------------------------------------------------------
  21708.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 381
  21709.  
  21710.                                                                       Index
  21711.         -------------------------------------------------------------------
  21712.  
  21713.         .AND., in IF and IFF, 238, 243,     Batch files (continued)
  21714.           244                                   branching in, 232
  21715.         ANSI driver, 24                         calling, 173
  21716.             and CLS, 179, 309                   capturing output of, 87
  21717.             and COLOR, 180, 309                 chaining, 173
  21718.             and PROMPT, 283                     commands for, 80, 147
  21719.             and screen colors, 136              comments in, 291
  21720.             and scrolling, 311                  compression, 90
  21721.             and TEXT, 328                       debugging, 86
  21722.             detecting, 100                      detecting 4DOS, 4OS2, or
  21723.             escape sequences, 71, 283,            4DOS/NT from, 83
  21724.               328                               displaying messages in,
  21725.             use by 4DOS, 131                      214, 216, 296, 298, 328,
  21726.         APM, see Advanced Power                   341
  21727.           Management                            echoing of commands, 78,
  21728.         Appending files, 181                      131, 214, 312
  21729.         Archive attribute, see File             environment variables in,
  21730.           attributes                              79
  21731.         Argument quoting, 118                   handling Ctrl-Break, 274
  21732.         Arguments, see Parameters               handling errors, 274
  21733.         Arithmetic, 109                         handling strings in, 88,
  21734.         ASCII, 22                                 312
  21735.         Asterisk, see *                         internal variables in, 79,
  21736.         At sign, see @ sign                       104
  21737.         ATTRIB, 167                             interrupting, 82
  21738.         Attributes, see File attributes         keyboard input in, 247, 249
  21739.         AUTOEXEC.BAT, 83                        labels in, 231, 232
  21740.             location of, 125                    modes, 77, 263
  21741.             parameters for, 126                 nesting, 101, 173
  21742.             speeding up, 325                    parameters, 78, 316
  21743.             starting KSTACK.COM, 55,                expansion, 117
  21744.               254                               samples, 82
  21745.         Automatic batch files, 82               saving environment in, 315
  21746.         Automatic directory changes, 44         screen display, 210, 212,
  21747.                                                   213
  21748.                        B                        sharing between 4DOS, 4OS2,
  21749.                                                   and 4DOS/NT, 72
  21750.         Backspace character, 71                 string processing in, 88,
  21751.         Base memory, see Memory                   312
  21752.         Base name, see File names               subroutines, 231, 295
  21753.         .BAT files, 20, 77, 263                 suspending execution of,
  21754.         Batch files, 77                           279
  21755.             aliases in, 84, 85                  temporary variables in, 80
  21756.             and executable extensions,          terminating, 174, 287
  21757.               66                                timing events in, 330
  21758.             and redirection, 51                 variable functions in, 79,
  21759.             automatic, 82                         115
  21760.             based on command history,       BATCOMP.EXE, 90
  21761.               235                           BEEP, 80, 131, 169
  21762.  
  21763.         -------------------------------------------------------------------
  21764.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 382
  21765.  
  21766.                                                                       Index
  21767.         -------------------------------------------------------------------
  21768.  
  21769.         Beeps                               Colors
  21770.             frequency of, 131                   and ANSI driver, 24, 136,
  21771.             length of, 131                        309
  21772.         BIOS output                             blinking text, 27
  21773.             and color-coded directory           bright background, 27, 135,
  21774.               displays, 31                        309
  21775.             and DRAWBOX, 211                    errors in, 27
  21776.             and DRAWHLINE, 212                  in directories, 30
  21777.             and DRAWVLINE, 213                  in history window, 133
  21778.             and LIST, 262                       in LIST, 135, 262
  21779.             and SCRPUT, 298                     in PROMPT, 283
  21780.             and SELECT, 302                     in SELECT, 136, 301
  21781.             and VSCRPUT, 341                    of border, 27
  21782.         BIOS output, in 4DOS, 143               of boxes, 210
  21783.         Border colors, see Colors               of lines, 212, 213
  21784.         Boxes, drawing, on screen, 210          of text, 298, 328, 341
  21785.         BREAK, 171                              of typed input, 35, 135
  21786.         .BTM files, 20, 77, 263                 setting defaults, 135, 179,
  21787.                                                   180
  21788.                        C                        setting, in 4START, 105
  21789.                                                 standard, 136
  21790.         CALL, 80, 173                           testing, 101, 102
  21791.         CANCEL, 80, 173, 174, 287           Command grouping, 69, see also
  21792.         Caps Lock key, 251                    EXCEPT, FOR, GLOBAL, and IF
  21793.         Carriage return character, 72           and redirection, 51, 70
  21794.             in keystroke aliases, 160       Command history, see History
  21795.         Case (upper / lower), 135, 312        list
  21796.         CD, 175                             Command line, 33
  21797.         CDD, 177                                arguments, see Parameters
  21798.         CDFS file system, 111                   automatic directory
  21799.         CDPATH environment variable,              changes, 44
  21800.           42, 45, 96, 176, 177, 286             echoing of, 214, 215
  21801.         Changing directories, 42, 44,           editing, 34, 137, 139
  21802.           175, 177, 280, 285                    editing mode, 34, 132, 311
  21803.         CHCP, 178                               expanded, viewing, 215
  21804.         CHDIR, 175                              filename completion, 40
  21805.         CLS, 80, 179                            help, 46
  21806.         .CMD files, 20, 77, 263                 history, 35, see also
  21807.         CMDLINE environment variable,             History list
  21808.           96                                    history window, 39
  21809.         Code pages, see Country code            input method, 133, 310
  21810.         Cold reboot, 289                        multiple commands, 45
  21811.         COLOR, 80, 180                          processing of, 19, 116
  21812.         Color-coded directory displays,         prompt, 281
  21813.           30, 135, 198, 301                 Command parsing, 116
  21814.             and redirection, 198            Command processor, 10
  21815.         COLORDIR environment variable,      Command Reference Guide, 146
  21816.           30, 96, 198, 301
  21817.  
  21818.  
  21819.         -------------------------------------------------------------------
  21820.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 383
  21821.  
  21822.                                                                       Index
  21823.         -------------------------------------------------------------------
  21824.  
  21825.         Command separator, 45, 72, 100,     COPY, 181
  21826.           131, 309                              and ctrl-Z end of file
  21827.             disabling, 312                        mark, 185
  21828.             in IFF, 244                         and extended attributes,
  21829.         Command tail, 19, 116                     184
  21830.         COMMAND.COM message server, 143     Country code, 22, 101, 178, 188
  21831.         Commands                            Critical errors, 49, 99
  21832.             conditional execution of,           automatic Fail response,
  21833.               244                                 142
  21834.             external, 18, 146, 276              detecting, 274
  21835.                 and /? help, 47             Ctrl-Break
  21836.                 exit codes for, 99              at file processing prompt,
  21837.             format of, 148                        48
  21838.             help for, 46, 234                   at page prompt, 48
  21839.             internal, 18, 146                   checking, 171, 274
  21840.                 disabling, 153, 310             during DELAY, 192
  21841.             length of, 34, 45, 47               during INKEY, 247, 249, 279
  21842.             list of, 153                        during SELECT, 300
  21843.             new, 148                            in batch files, 82, 274
  21844.             order of execution, 116             in external programs, 99
  21845.             types of, 148                   Ctrl-C, see Ctrl-Break
  21846.             unknown, handling, 165          Ctrl-X, see Escape character
  21847.         Comments                            Ctrl-Z end of file mark, and
  21848.             in .INI file, 122                 COPY, 185
  21849.             in alias files, 166             CTTY, 52, 187
  21850.             in batch files, 291             Current drive and directory, 16
  21851.             in environment variable             changing, see Changing
  21852.               files, 307                          directories
  21853.         Compatibility between 4DOS,             retrieving, 101
  21854.           4OS2, and 4DOS/NT, 72                 saving temporarily, 285,
  21855.         Compound character, see Command           315
  21856.           separator                         Cursor
  21857.         Compressed drives, 200, 303             positioning, 296, 298, 341
  21858.         COMSPEC environment variable,           shape, 131, 312
  21859.           96, 121, 336
  21860.         Conditional commands, 68                           D
  21861.             disabling, 312
  21862.         CONFIG.SYS, 12                      Daily execution of batch file,
  21863.         Configuration, of 4DOS, 4OS2,         115
  21864.           and 4DOS/NT, 96, 120              DATE, 188
  21865.         CONsole device, 187, see also           time format, 130
  21866.           Standard input, Standard          Date ranges, 60
  21867.           output, and Standard error        Dates, formatting, 112
  21868.         Coprocessor, see Numeric            Day of week, 102
  21869.           coprocessor                       Default directory, see Current
  21870.                                               drive and directory
  21871.                                             Default drive, see Current
  21872.                                               drive and directory
  21873.                                             DEL, 189
  21874.  
  21875.         -------------------------------------------------------------------
  21876.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 384
  21877.  
  21878.                                                                       Index
  21879.         -------------------------------------------------------------------
  21880.  
  21881.         DELAY, 192                          DO, 80, 206
  21882.         DELDIR environment variable,            and GOTO, 207
  21883.           190, 271                          DOS
  21884.         Delete tracking, 190                    commands, help for, 46, 146
  21885.         Deleting files, 189                     compatibility box, see OS/2
  21886.         DESCRIBE, 137, 193                        DOS sessions
  21887.         DESCRIPT.ION, see File                  default command processor,
  21888.           descriptions                            11
  21889.         Descriptions, see File                  memory, see Memory
  21890.           descriptions                      DOS/V (Japan), 143
  21891.         DESQview                            DPATH, 209
  21892.             and 4DOS, 142                   DRAWBOX, 80, 210
  21893.             and secondary shells, 123       DRAWHLINE, 80, 212
  21894.             detecting, 102, 105             DRAWVLINE, 80, 213
  21895.         DETACH, 195                         Drive, see Disk drives
  21896.         Detecting 4DOS, 4OS2, or
  21897.           4DOS/NT from a batch file, 83                    E
  21898.         DIR, 196
  21899.             and include lists, 65           ECHO, 214
  21900.             color-coded displays, 30,           ANSI sequences in, 71
  21901.               135, 198                          at command line, 215
  21902.                 and CTTY, 187                   in batch files, 78, 80, 86,
  21903.                 and redirection, 198,             291
  21904.                   201                               default state, 131, 312
  21905.             directory size limits, 199              inheritance, 173
  21906.             displaying file                 ECHOS, 80, 216
  21907.               descriptions, and             Editing aliases and environment
  21908.               redirection, 198, 203           variables, 218
  21909.             time format, 130                ELSE and ELSEIFF, in IFF, 244
  21910.         DIRCMD environment variable, 96     EMS, see Memory
  21911.         Directories, see Subdirectories     ENDDO, in DO, 206
  21912.         Directory history window, 43        ENDIFF, in IFF, 244
  21913.         Directory stack, 285                ENDLOCAL, 80, 85, 217, 315, 336
  21914.             clearing, 280                   ENDTEXT, 81, 328
  21915.             displaying, 205                 Environment, 21, 94, 305
  21916.         Directory tree, 15                      master, 95, 112, 219, 306,
  21917.         DIREXIST test, in IF and IFF,             336
  21918.           242                                   saving temporarily, 315
  21919.         DIRS, 205, 280, 285                     size of, 94, 126, 306
  21920.         Disk drives, 14                             displaying, 267
  21921.             compressed, 200, 303                    testing, 102
  21922.             drive letter, 14                    storing in upper memory,
  21923.             space on, 108, 228                    129
  21924.             swapping to, 128, 325           Environment variables, 21, 94,
  21925.             testing status of, 113            305
  21926.             volume label, 112, 340              and INKEY, 247
  21927.             write verification on, 339          and INPUT, 249
  21928.         Display colors, see Colors              characters in name, 94
  21929.                                                 creating, 305
  21930.  
  21931.         -------------------------------------------------------------------
  21932.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 385
  21933.  
  21934.                                                                       Index
  21935.         -------------------------------------------------------------------
  21936.  
  21937.         Environment variables               Extended ASCII, see ASCII
  21938.           (continued)                       Extended attributes
  21939.             displaying, 305                     and COPY, 184
  21940.             editing, 218                        and MOVE, 271
  21941.             expansion, 48, 117              Extended key codes, see Keys
  21942.                 and batch file              Extended memory, see Memory
  21943.                   debugging, 87             Extended parent directory
  21944.                 disabling, 312                names, 57
  21945.                 nested, 94                  Extension, see File names
  21946.             for current directory, in       External commands, see Commands
  21947.               Windows NT, 97                EXTPROC support, in 4OS2 and
  21948.             nesting, 94                       4DOS/NT, 93
  21949.             reading from a file, 307
  21950.             referencing, 94                                F
  21951.             removing, 336
  21952.             spaces in, 306                  FAT file system, 14
  21953.         ERASE, 189                              detecting, 111
  21954.         Error level, see Exit codes             file names, 16
  21955.         Error messages, 345                     path length, 16
  21956.         ERRORLEVEL test, in IF and IFF,     File attributes, 18, 167
  21957.           241                                   and COPY, 184, 185
  21958.         Errors, handling, in batch              and DEL, 191
  21959.           files, 274                            and DIR, 196, 200, 203
  21960.         Escape character, 71, 72, 99,           and EXCEPT, 220
  21961.           132, 310                              and FOR, 226
  21962.         ESET, 95, 137, 218, 306                 and GLOBAL, 229
  21963.             and PATH, 276                       and MOVE, 272
  21964.         EXCEPT, 70, 220                         and REN, 293
  21965.             and DEL /Z, 191                     and SELECT, 302
  21966.         Executable extensions, 20, 66,          of subdirectories, 168
  21967.           117, 276                              setting, 167
  21968.             and filename completion, 41         subdirectory, 168
  21969.             and Personal REXX, 92               testing, 108
  21970.             wildcards in, 68                    viewing, 167
  21971.         EXIST test, in IF and IFF, 242          volume label, 168
  21972.         EXIT, 222                           File descriptions, 193
  21973.         Exit codes, 117                         controlling processing of,
  21974.             and CALL, 173                         132, 310
  21975.             and CANCEL, 174                     displaying, and
  21976.             and conditional commands,             redirection, 198, 203
  21977.               68                                length of, 132, 193, 198,
  21978.             and DEL, 190                          301
  21979.             and EXIT, 222                       retrieving, 108
  21980.             and GLOBAL, 229                     selecting files by, 197,
  21981.             and IF tests, 241                     201, 302, 303
  21982.             and PROMPT, 281                     sorting by, 203, 304
  21983.             and QUIT, 287
  21984.             retrieving, 99
  21985.         Expanded memory, see Memory
  21986.  
  21987.         -------------------------------------------------------------------
  21988.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 386
  21989.  
  21990.                                                                       Index
  21991.         -------------------------------------------------------------------
  21992.  
  21993.         File names, 13, 16, 56              Form feed character, 72
  21994.             FAT-compatible, 17              FREE, 228
  21995.             HPFS and NTFS, 17               Free memory, see Memory
  21996.                 extensions, 18
  21997.                 quoting, 17                                G
  21998.                 semicolons in, 17, 60
  21999.             length of, 16, 56               General Concepts, 10
  22000.             parts of, 13                    GLOBAL, 70, 229
  22001.                 separating, 109, 110,       Glossary, 368
  22002.                   111, 112, 113             GOSUB, 80, 231, 295
  22003.             shorthand for, 56                   and FOR, 225
  22004.             unique, 114                     GOTO, 81, 232
  22005.         File processing prompts, 48             and DO, 207
  22006.         File system, see FAT file               and IFF, 246
  22007.           system, HPFS file system, and
  22008.           NTFS file system                                 H
  22009.         Filename completion, 40
  22010.             window, 41                      HELP, 46, 234
  22011.         Files, 13                               and external commands, 146
  22012.             adding line numbers to, 334         books to load, in 4OS2, 126
  22013.             copying, 181                        location of files, in 4DOS,
  22014.             date stamp, 18, 110, 188,             127
  22015.               196                               options, in 4DOS, 126
  22016.             deleting, 189                   Hidden attribute, see File
  22017.             displaying, 260, 334              attributes
  22018.             finding, 110                    HISTORY, 235
  22019.             forcing deletion of, 190,       History list, 35, 235
  22020.               271                               and secondary shells, 38,
  22021.             moving, 269, 292                      164
  22022.             processing data from, 110,          controlling, 132, 236
  22023.               112                               global, 38, 128
  22024.             reading, in FOR, 224                    storing in upper
  22025.             renaming, 292                             memory, 129
  22026.             searching for, 113                  inheritance, in secondary
  22027.             selecting, 56, 299                    shells, 143
  22028.                 with date, time, and            local, 38, 128
  22029.                   size ranges, 60               memory space for, 127, 267
  22030.                 with extended parent            reading from a file, 236
  22031.                   directory names, 57       History windows
  22032.                 with include lists, 65          colors of, 133
  22033.                 with multiple                   command line, 39
  22034.                   filenames, 64                 directory, 43
  22035.                 with wildcards, 57              position of, 133
  22036.             size of, 110, 196                   size of, 133
  22037.             time stamp, 18, 110, 196,       HMA, see Memory
  22038.               329                           HPFS file system, 14
  22039.             true path of, 114, 333              and 4DOS, 17
  22040.         FOR, 70, 81, 223                        and DIR, 199, 201, 202, 204
  22041.             and GOSUB, 225                      and file descriptions, 194
  22042.  
  22043.         -------------------------------------------------------------------
  22044.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 387
  22045.  
  22046.                                                                       Index
  22047.         -------------------------------------------------------------------
  22048.  
  22049.         HPFS file system (continued)        INT 2E support (4DOS), 142
  22050.             and SELECT, 303, 304            Internal commands, see Commands
  22051.             detecting, 111                  Internal variables, 97, see
  22052.             file names, 17, 56, 312           also Quick Reference on page
  22053.             path length, 16                   394
  22054.             semicolons in file names,           in aliases, 163
  22055.               17, 60                            in batch files, 79, 104
  22056.             time stamps in, 203             International character sets,
  22057.                                               22, 178, 211, 212, 213, 357
  22058.                        I                    ISALIAS test, in IF and IFF,
  22059.                                               242
  22060.         IF, 70, 81, 238                     ISDIR test, in IF and IFF, 242
  22061.             conditions, 239                 ISINTERNAL test, in IF and IFF,
  22062.         IFF, 81, 244                          242
  22063.             and GOSUB, 231                  ISLABEL test, in IF and IFF,
  22064.             and GOTO, 246                     242
  22065.             conditions, 239                 ISWINDOW test, in IF and IFF,
  22066.         Include lists, 65                     242
  22067.         .INI file, 120                      ITERATE, in DO, 206
  22068.             advanced directives, 141
  22069.             and installation, 120                          J
  22070.             and SETDOS, 123, 130, 308
  22071.             changing, for secondary         JOIN (DOS command), 333
  22072.               shells, 142
  22073.             color directives, 135                          K
  22074.             comments in, 122
  22075.             configuration directives,       KEYBD, 251
  22076.               130                           Keyboard
  22077.             directive types, 124                Caps Lock, Num Lock, and
  22078.             directives, 121, see also             Scroll Lock, 251
  22079.               Quick Reference on page           checking buffer, 248, 250
  22080.               394                               clearing buffer, 248, 250,
  22081.             errors in, 122, 127, 128              254
  22082.             global section, 122             KEYS, 253
  22083.             initialization directives,      Keys
  22084.               125                               codes, 22, 361
  22085.             key mapping directives, 136             ASCII, 22, 357
  22086.             location of, and                        extended, 23
  22087.               multitaskers, 123                     extended ASCII, 22
  22088.             primary section, 122                F11 and F12, using, 32
  22089.             prompts during execution,           mapping, 136
  22090.               127                                   clearing default key
  22091.             secondary section, 123                    map, 141
  22092.         INKEY, 81, 86, 247                          for all input, 137
  22093.         INPUT, 81, 137, 249                         for command line
  22094.         Input and output, commands for,               editing, 139
  22095.           147                                       for history windows,
  22096.         Installable file systems                      140
  22097.           (OS/2), 15, 111                           for LIST, 141
  22098.  
  22099.         -------------------------------------------------------------------
  22100.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 388
  22101.  
  22102.                                                                       Index
  22103.         -------------------------------------------------------------------
  22104.  
  22105.         Keys (continued)                    Memory (continued)
  22106.             names, 31, 159                      upper memory blocks (UMBs)
  22107.         KEYSTACK, 55, 81, 87, 254                   and LOADHIGH, 257
  22108.         Keystroke aliases, see Aliases              loading 4DOS in, 130
  22109.         KSTACK.COM, 55, 254                         storing aliases in, 129
  22110.                                                     storing environment in,
  22111.                        L                              129
  22112.                                                     storing history in, 129
  22113.         Labels, in batch files, 231,        Memory resident programs, see
  22114.           232                                 TSRs
  22115.         LEAVE, in DO, 206                   Messages, displaying, 214, 216
  22116.         LH, 257                             Microsoft Windows
  22117.         LIM EMS, see Memory                     and screen colors, 29
  22118.         Line feed character, 72                 and secondary shells, 123
  22119.         Lines, drawing, on screen, 212,         detecting, 104
  22120.           213                               MKDIR, 266
  22121.         LIST, 260                           Monitor, detecting type of, 102
  22122.             default colors, 135             Monochrome monitor, and colors,
  22123.             keys used with, 137, 141          27
  22124.             print device for, 134           MOVE, 269
  22125.             screen size, 134, 311               and extended attributes,
  22126.         LOADBTM, 77, 81, 263                      271
  22127.         LOADHIGH, 257                           and SELECT, 270
  22128.         LOG, 87, 264                        MSGBOX, 273
  22129.         Log files, time format, 130         Multiple commands, 45
  22130.         Lower case, 135, 312                    disabling, 312
  22131.                                                 in aliases, 156
  22132.                        M                        separator character, see
  22133.                                                   Command separator
  22134.         Master environment, see             Multiple filenames, 64
  22135.           Environment
  22136.         MD, 266                                            N
  22137.         MEMORY, 267
  22138.         Memory                              Netware, see Novell Netware
  22139.             base                            Networks
  22140.                 amount of, 108                  disk swapping on, 144
  22141.                 DOS in, 338                     drive names on, 14
  22142.             expanded (EMS)                  NOT, in IF and IFF, 238, 243,
  22143.                 amount of, 109, 267           244
  22144.                 swapping to, 128, 325       Novell Netware, and 4DOS, 143,
  22145.             extended (XMS)                    144
  22146.                 amount of, 114, 267         NTFS file system, 14
  22147.                 swapping to, 128, 325           and DIR, 199, 201, 202, 204
  22148.             extended, amount of, 109,           and file descriptions, 194
  22149.               267                               and SELECT, 303, 304
  22150.             free, 267                           detecting, 111
  22151.             high memory area (HMA)              displaying short file
  22152.                 DOS in, 338                       names, 204
  22153.                 status of, 267                  file names, 17, 56, 312
  22154.  
  22155.         -------------------------------------------------------------------
  22156.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 389
  22157.  
  22158.                                                                       Index
  22159.         -------------------------------------------------------------------
  22160.  
  22161.         NTFS file system (continued)        PATH environment variable
  22162.             path length, 16                   (continued)
  22163.             semicolons in file names,           format of, 276
  22164.               17, 60                            invalid directory in, 278
  22165.             time stamps on, 203                 length of, 277
  22166.         Num Lock key, 251                       viewing, 276
  22167.         Numbers, comparing, 239             Path, of a file, 13, 15
  22168.         Numeric coprocessor, 103                and aliases, 75
  22169.         Numeric strings, testing for,           extracting from full file
  22170.           112                                     name, 113
  22171.                                                 finding full path name, 111
  22172.                        O                        finding true path, 114, 333
  22173.                                                 if omitted, 16
  22174.         ON, 274                                 in executable extensions,
  22175.         Operating system, 10                      67
  22176.             detecting, 102                      in include lists, 65
  22177.         Options, in commands, 149               length of, 16
  22178.         Or (||) in conditional              PAUSE, 81, 86, 279
  22179.           commands, 69                      Percent sign, see % sign
  22180.         .OR., in IF and IFF, 238, 243,      Personal REXX, 92
  22181.           244                               Pipes, 53, 326
  22182.         OS/2                                    disabling, 312
  22183.             and screen colors, 29               in 4OS2 and 4DOS/NT, 54
  22184.             commands, help for, 146             nested, 54
  22185.             default command processor,      POPD, 205, 280, 285
  22186.               11                            Previous working directory,
  22187.             detecting, 102                    saving and restoring, 42,
  22188.             DOS sessions, 102, 144            176, 177
  22189.                 extended attributes         Primary shell, see Shell
  22190.                   and, 184, 271             [Primary], see .INI file
  22191.                 in OS/2 version 2.0,        Printer
  22192.                   13, 104                       checking status of, 112
  22193.                                                 sending control codes to,
  22194.                        P                          72
  22195.                                                 sending files to, 181
  22196.         Paged output, 48, 134                   use in LIST, 261
  22197.         Parameter character, 72             PROMPT command, 281
  22198.         Parameters                              ANSI sequences in, 71, 283
  22199.             expansion, 117                      changing for secondary
  22200.             in aliases, 162, 163                  shell, 105
  22201.             in batch files, 78, 316         PROMPT environment variable, 97
  22202.         Parent directory, 16, 57, 175,      Prompt Solution, The, 6
  22203.           177, 266                          PUSHD, 205, 280, 285
  22204.         PATH command, 276
  22205.         PATH environment variable, 97
  22206.             "." in, 277
  22207.             and @SEARCH variable
  22208.               function, 113
  22209.             changing, 218, 276
  22210.  
  22211.         -------------------------------------------------------------------
  22212.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 390
  22213.  
  22214.                                                                       Index
  22215.         -------------------------------------------------------------------
  22216.  
  22217.                        Q                                   S
  22218.  
  22219.         Quick reference                     Scan codes, see Keys
  22220.             .INI file directives, 396       SCREEN, 81, 296
  22221.             internal variables, 394         Screen, see also Colors
  22222.             variable functions, 395             clearing, 179
  22223.         QUIT, 81, 173, 174, 287                 reading text from, 113
  22224.         Quoting                                 size, 24, 134, 311
  22225.             of arguments, 118                       detecting, 101, 103
  22226.             of file names, 17               Scroll Lock key, 251
  22227.                                             SCRPUT, 81, 298
  22228.                        R                    Search path, see PATH
  22229.                                               environment variable
  22230.         RAM, see Memory                     Secondary shell, see Shell
  22231.         RAM disk, 14                        [Secondary], see .INI file
  22232.             swapping to, 128                SELECT, 299
  22233.         Ranges (date, time, and size),          and command grouping, 70
  22234.           60                                    and include lists, 65
  22235.         RD, 288                                 and MOVE, 270
  22236.         Read-only attribute, see File           color-coded displays, 30,
  22237.           attributes                              135, 301, 303
  22238.         REBOOT, 289                             default colors, 136, 301
  22239.         Redirection, 50                         keys used with, 137
  22240.             alternative methods, 326,           screen size, 134, 311
  22241.               344                               time format, 130
  22242.             and batch files, 51             Semicolon, see ;
  22243.             and color-coded directory       SET, 95, 305
  22244.               displays, 198                 SETDOS, 308
  22245.             and command grouping, 51,           /A(NSI), 131, 179, 180, 309
  22246.               70                                /B(rightBG), 28, 135, 309
  22247.             and NoClobber, 51, 311              /C(ompound character), 73,
  22248.             capturing batch file                  131, 309
  22249.               output, 87                        /D(escriptions), 132, 310
  22250.             disabling, 312                      /E(scape character), 73,
  22251.             nested, 52                            132, 310
  22252.             preventing file overwrites,         /I(nternal), 153, 242, 310
  22253.               134                               /L(ine), 134, 310
  22254.             with numeric file handles,          /M(ode), 132, 311
  22255.               52                                /N(o clobber), 134, 311
  22256.         Registration, 6                         /P(arameter character), 73,
  22257.         REM, 81, 291                              79, 134, 311
  22258.         REN, 269, 292                           /R(ows), 135, 311
  22259.         RENAME, 269, 292                        /S(hape), 131, 312
  22260.         RETURN, 80, 231, 295                    /U(pper), 104, 135, 201,
  22261.         REXX support, 92                          312
  22262.         RMDIR, 288                              /V(erbose), 78, 131, 312
  22263.         Root directory, 15                      /X (expansion), 46, 90, 94,
  22264.                                                   107, 118, 119, 312
  22265.  
  22266.  
  22267.         -------------------------------------------------------------------
  22268.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 391
  22269.  
  22270.                                                                       Index
  22271.         -------------------------------------------------------------------
  22272.  
  22273.         SETDOS (continued)                  Swapping, 128
  22274.             /Y (single step), 86, 313           enabling and disabling, 325
  22275.             and .INI file, 123, 308             file names used by, 128,
  22276.         SETLOCAL, 80, 81, 85, 315, 336            144
  22277.         Shell, 1                                types of, 128
  22278.             level, 103, 282                 SWAPPING command, 325
  22279.             primary, 12                     Switches, in commands, 149
  22280.             secondary, 12                   System
  22281.                 inheritance, 123, 143,          attribute, see File
  22282.                   308                             attributes
  22283.         SHIFT, 79, 81, 316                      rebooting, 289
  22284.         SHRALIAS program, 38, 164
  22285.         Size ranges, 60                                    T
  22286.         Sound, see BEEP
  22287.         Stack size, in 4DOS, 143            Tab character, 72
  22288.         Standard error, 50                  Technical support, 7
  22289.         Standard input, 50, 262, 326,       TEE, 54, 326
  22290.           344                               TEMP environment variable, 97
  22291.         Standard output, 50, 326, 344       TEMP4DOS environment variable,
  22292.         START, 81, 317                        97
  22293.         Startup command line, viewing,      TEXT, 81, 328
  22294.           in 4START, 83                     THEN, in IFF, 244
  22295.         Status tests, in IF and IFF,        TIME, 329
  22296.           241                               Time ranges, 60
  22297.         Stopwatch, see TIMER                Time, format of, 130
  22298.         Strings                             TIMER, 81, 330
  22299.             comparing, 239                      time format, 130
  22300.             testing for numeric digits,     Times, formatting, 112
  22301.               112                           TITLE, 332
  22302.         Subdirectories, 15                  TRUENAME, 333
  22303.             attributes of, 168              TSRs
  22304.             changing, see Changing              and .BTM files, 263
  22305.               directories                       and SETLOCAL, 315
  22306.             copying, 186                        and swapping state, 325
  22307.             creating, 266                   TYPE, 334
  22308.             deleting files from, 191
  22309.             descriptions for, 193                          U
  22310.             executing commands in, 229
  22311.             hidden, 229                     UMBs, see Memory
  22312.             moving, 269, 272                UNALIAS, 85, 335
  22313.             name, maximum length of, 16     Unknown commands, handling, 165
  22314.             removing, 191, 272, 288         UNKNOWN_CMD alias, 21, 165
  22315.             renaming, 292                       and IFF, 233
  22316.             testing for, 242                UNSET, 80, 95, 336
  22317.         Subdirectory attribute, see         UNTIL, in DO, 206
  22318.           File attributes                   Upgrades, 6
  22319.         SUBST (DOS command), 333            Upper case, 135, 312
  22320.         Support, 7                          Upper memory, see Memory
  22321.  
  22322.  
  22323.         -------------------------------------------------------------------
  22324.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 392
  22325.  
  22326.                                                                       Index
  22327.         -------------------------------------------------------------------
  22328.  
  22329.                        V
  22330.                                             Windows NT
  22331.         Variable expansion, see                 and screen colors, 29
  22332.           Environment variables,                default command processor,
  22333.           expansion                               11
  22334.         Variable functions, 105, see            detecting, 102
  22335.           also Quick Reference on page
  22336.           394                                              X
  22337.             in aliases, 115, 163
  22338.             in batch files, 79, 115         XMS, see Memory
  22339.         VER, 338                            .XOR., in IF and IFF, 238, 243,
  22340.         VERIFY, 186, 339                      244
  22341.         Version numbers, 100, 102, 338
  22342.         Vertical text display, 341                         Y
  22343.         Video hardware, 24, see also
  22344.           Screen                            Y, 54, 344
  22345.             detecting, 102, 104
  22346.         Virtual disk, see RAM disk                         Z
  22347.         VOL, 340
  22348.         Volume, see Disk drives             Zero length files, creating,
  22349.         Volume label, see Disk drives         52, 291
  22350.         Volume label attribute, see
  22351.           File attributes
  22352.         VSCRPUT, 81, 341
  22353.  
  22354.                        W
  22355.  
  22356.         Warm reboot, 289
  22357.         Warning mark, see !
  22358.         WHILE, 206
  22359.         Wildcards, 57
  22360.             and @SEARCH variable
  22361.               function, 113
  22362.             and filename completion, 41
  22363.             and renaming
  22364.               subdirectories, 293
  22365.             extended, 58
  22366.                 and DEL, 190
  22367.             in executable extensions,
  22368.               68
  22369.             in include lists, 65
  22370.             in multiple filenames, 64
  22371.         WINDOW, 343
  22372.         Windows, see also Microsoft
  22373.           Windows
  22374.             controlling state of, 130,
  22375.               154, 343
  22376.             size of, 130
  22377.             title of, 154
  22378.  
  22379.         -------------------------------------------------------------------
  22380.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 393
  22381.  
  22382.                                                             Quick Reference
  22383.         -------------------------------------------------------------------
  22384.  
  22385.         Quick Reference
  22386.  
  22387.  
  22388.  
  22389.         Internal Variables
  22390.  
  22391.         This table lists the 4DOS, 4OS2, and 4DOS/NT internal variables by
  22392.         type, with a page reference for each.
  22393.  
  22394.  
  22395.  
  22396.  
  22397.  
  22398.  
  22399.         Hardware status         _HLOGFILE......102      Dates and times
  22400.                                 _KSTACK........102
  22401.         _APMAC.........100      _LOGFILE ......102      _DATE..........101
  22402.         _APMBATT.......101      _PID...........103      _DAY...........102
  22403.         _APMLIFE.......101      _PPID..........103      _DOW...........102
  22404.         _CPU...........101      _PTYPE.........103      _DOY...........102
  22405.         _MONITOR.......102      _SHELL.........103      _HOUR..........102
  22406.         _NDP...........103      _SID...........103      _MINUTE........102
  22407.         _VIDEO.........104      _SWAPPING......103      _MONTH.........102
  22408.                                 _TRANSIENT.....104      _SECOND........103
  22409.                                 _WINTITLE......104      _TIME..........103
  22410.         Operating system                                _YEAR..........104
  22411.         and software status
  22412.                                 Screen and colors
  22413.         _ANSI..........100                              Error codes
  22414.         _BOOT..........101       _BG...........101
  22415.         _CODEPAGE......101      _COLUMN........101      ?...............99
  22416.         _COUNTRY.......101      _COLUMNS.......101      ??..............99
  22417.         _DOS...........102      _FG............102      _?..............99
  22418.         _DOSVER........102      _ROW...........103      _SYSERR........103
  22419.         _DV............102      _ROWS..........103
  22420.         _MOUSE.........102
  22421.         _WIN...........104                              Compatibility
  22422.         _WINDIR........104      Drives and
  22423.         _WINSYSDIR.....104      directories              =..............99
  22424.         _WINVER........104                               +.............100
  22425.                                 _CWD...........101
  22426.                                 _CWDS..........101
  22427.         Command processor       _CWP...........101
  22428.         status                  _CWPS..........101
  22429.                                 _DISK..........102
  22430.         _4VER..........100      _LASTDISK......102
  22431.         _ALIAS.........100
  22432.         _BATCH.........101
  22433.         _ENV...........102
  22434.  
  22435.         -------------------------------------------------------------------
  22436.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 394
  22437.  
  22438.                                                             Quick Reference
  22439.         -------------------------------------------------------------------
  22440.  
  22441.  
  22442.  
  22443.         Variable Functions
  22444.  
  22445.         This table lists the 4DOS, 4OS2, and 4DOS/NT variable functions by
  22446.         type, with a page reference for each.
  22447.  
  22448.  
  22449.  
  22450.  
  22451.  
  22452.         System status           @FILETIME......110      Numbers and
  22453.                                 @FILEWRITE.....110      arithmetic
  22454.         @DOSMEM........108      @FINDFIRST.....110
  22455.         @EMS...........109      @FINDNEXT......111      @DEC...........108
  22456.         @EXTENDED......109      @LINE..........112      @EVAL..........109
  22457.         @MASTER........112      @LINES.........112      @INC...........111
  22458.         @READSCR.......113      @SEARCH........113      @INT...........111
  22459.         @XMS...........114      @TRUENAME......114      @NUMERIC.......112
  22460.                                 @UNIQUE........114      @RANDOM........113
  22461.  
  22462.         Drives and devices
  22463.                                 File names              Dates and times
  22464.         @CDROM.........108
  22465.         @DEVICE........108      @EXT...........109      @DATE..........108
  22466.         @DISKFREE......108      @FILENAME......110      @MAKEDATE......112
  22467.         @DISKTOTAL.....108      @FULL..........111      @MAKETIME......112
  22468.         @DISKUSED......108      @NAME..........112      @TIME..........114
  22469.         @FSTYPE........111      @PATH..........113
  22470.         @LABEL.........112
  22471.         @LPT...........112                              Utility
  22472.         @READY.........113      Strings and
  22473.         @REMOTE........113      characters              @ALIAS.........107
  22474.         @REMOVABLE.....113                              @SELECT........113
  22475.                                 @ASCII.........107      @EXEC..........109
  22476.                                 @CHAR..........108
  22477.         Files                   @INDEX.........111
  22478.                                 @INSTR.........111
  22479.         @ATTRIB........108      @LEN...........112
  22480.         @DESCRIPT......108      @LOWER.........112
  22481.         @EXETYPE.......109      @REPEAT........113
  22482.         @FILEAGE.......109      @SUBSTR........113
  22483.         @FILECLOSE.....109      @TRIM..........114
  22484.         @FILEDATE......110      @UPPER.........114
  22485.         @FILEOPEN......110      @WORD..........114
  22486.         @FILEREAD......110
  22487.         @FILES.........110
  22488.         @FILESEEK......110
  22489.         @FILESIZE......110
  22490.  
  22491.         -------------------------------------------------------------------
  22492.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 395
  22493.  
  22494.                                                             Quick Reference
  22495.         -------------------------------------------------------------------
  22496.  
  22497.  
  22498.  
  22499.         .INI File Directives
  22500.  
  22501.         This table lists the 4DOS, 4OS2, and 4DOS/NT .INI file directives
  22502.         by type, with a page reference for each.
  22503.  
  22504.  
  22505.  
  22506.  
  22507.  
  22508.         Initialization          DescriptionMax.132      Advanced
  22509.                                 Descriptions...132
  22510.         4StartPath.....125      EditMode.......132      All Products
  22511.         Alias..........125      EscapeChar.....132
  22512.         AutoExecPath   125      HistCopy.......132      ClearKeyMap....141
  22513.         AutoExecParms  126      HistLogName....132      NextINIFile....142
  22514.         Environment....126      HistMin........132
  22515.         EnvFree........126      HistWinColors..133           4DOS Only
  22516.         HelpBook.......126      HistWinHeight..133
  22517.         HelpOptions....126      HistWinLeft....133      CritFail.......142
  22518.         HelpPath.......127      HistWinTop.....133      DiskReset......142
  22519.         History........127      HistWinWidth...133      DVCleanup......142
  22520.         INIQuery.......127      LineInput......133      FullINT2E......142
  22521.         LocalAliases...128      LogName........134      Inherit........143
  22522.         LocalHistory...128      NoClobber......134      MessageServer..143
  22523.         PauseOnError...128      ParameterChar..134      NetwareNames...143
  22524.         Swapping.......128      Printer........134      OutputBIOS.....143
  22525.         UMBAlias.......129      ScreenColumns..134      StackSize......143
  22526.         UMBEnvironment.129      ScreenRows.....134      SwapReopen.....144
  22527.         UMBHistory.....129      UpperCase......135      UniqueSwapName.144
  22528.         UMBLoad........130
  22529.         WindowHeight...130
  22530.         WindowState....130      Color                   Key Mapping
  22531.         WindowWidth....130
  22532.         WindowX........130      BrightBG.......135      General Input
  22533.         WindowY........130      ColorDir.......135
  22534.                                 InputColors....135      Backspace......137
  22535.                                 ListColors.....135      BeginLine......137
  22536.         Configuration           ListStatBarColors       Del............137
  22537.                                 ...............136      DelToBeginning.137
  22538.         AmPm...........130      SelectColors...136      DelToEnd.......137
  22539.         ANSI...........131      SelectStatBarColors     DelWordLeft....137
  22540.         BatchEcho......131      ...............136      DelWordRight...138
  22541.         BeepFreq.......131      StdColors......136      Down...........138
  22542.         BeepLength.....131                              EndLine........138
  22543.         CommandSep.....131                              EraseLine......138
  22544.         CursorIns......131                              ExecLine.......138
  22545.         CursorOver.....132                              Ins............138
  22546.  
  22547.         -------------------------------------------------------------------
  22548.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 396
  22549.  
  22550.                                                             Quick Reference
  22551.         -------------------------------------------------------------------
  22552.  
  22553.         Left...........138
  22554.         NormalKey......138
  22555.         Right..........138
  22556.         Up.............138
  22557.         WordLeft.......139
  22558.         WordRight......139
  22559.  
  22560.            Command Line
  22561.               Editing
  22562.  
  22563.         AddFile........139
  22564.         CommandEscape..139
  22565.         DelHistory.....139
  22566.         EndHistory.....139
  22567.         Help...........139
  22568.         NextFile.......139
  22569.         NextHistory....139
  22570.         NormalEditKey..139
  22571.         PopFile........139
  22572.         PrevFile.......140
  22573.         PrevHistory....140
  22574.         SaveHistory....140
  22575.  
  22576.           History Window
  22577.  
  22578.         DirWinOpen.....140
  22579.         HistWinBegin...140
  22580.         HistWinDel.....140
  22581.         HistWinEdit....140
  22582.         HistWinEnd.....140
  22583.         HistWinExec....140
  22584.         HistWinOpen....140
  22585.         NormalHWinKey..140
  22586.  
  22587.                LIST
  22588.  
  22589.         ListFind.......141
  22590.         ListHex........141
  22591.         ListHighBit....141
  22592.         ListInfo.......141
  22593.         ListNext.......141
  22594.         ListPrint......141
  22595.         ListWrap.......141
  22596.         NormalListKey..141
  22597.  
  22598.  
  22599.  
  22600.  
  22601.  
  22602.  
  22603.         -------------------------------------------------------------------
  22604.         Copr. 1993, JP Software Inc.    4DOS, 4OS2, 4DOS/NT Reference / 397
  22605.